{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Mapping Press Releases in the 2015 Canadian Federal Election using word2vec and t-SNE"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "The 2015 Canadian federal election was a long one (by Canadian standards anyway!). It generated a lot of press and we thought it would be a great opportunity to collect and play with that data.\n",
    "\n",
    "Each party has a different view on what is important to move Canada forward. This has the effect of centering their official message around certain themes. The question we asked is: can we find patterns in the words used in each party’s press releases? Do some deal more with certain themes than others? Can we gain insights into their communication strategies?\n",
    "\n",
    "This demo is based on a [blog post by François Maillet][1] from right after the campaign.\n",
    "\n",
    "[1]: http://blog.mldb.ai/blog/posts/2015/10/election2015/"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "from pymldb import Connection\n",
    "mldb = Connection()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Importing the data"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "collapsed": true
   },
   "source": [
    "We wrote a small scraper using the [scrapy Python library](http://scrapy.org/). We scraped the press releases of the NDP, the Liberals, the Green Party and the Conservatives. The resulting data was save in a CSV file with one press release per line."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "<Response [201]>\n"
     ]
    }
   ],
   "source": [
    "print mldb.post('/v1/procedures', {\n",
    "    'type': 'import.text',\n",
    "    'params': {\n",
    "        'dataFileUrl': 'http://public.mldb.ai/datasets/press_releases/data.csv.gz',\n",
    "        'outputDataset': {'type': 'sparse.mutable', \n",
    "                          'id':'raw'},\n",
    "        'named': \"'pr' + lineNumber()\",\n",
    "        'ignoreBadLines': True,\n",
    "        'where': \"TIMESTAMP date > TIMESTAMP '2015-08-04'\"\n",
    "        }\n",
    "    })"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Here is what the raw data look like."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>date</th>\n",
       "      <th>full_text</th>\n",
       "      <th>link</th>\n",
       "      <th>party</th>\n",
       "      <th>title</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>_rowName</th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>pr816</th>\n",
       "      <td>2015-08-29T00:00:00</td>\n",
       "      <td>David Dodge  The numbers dont tell you very mu...</td>\n",
       "      <td>https://www.liberal.ca/experts-agree-harper-di...</td>\n",
       "      <td>liberal</td>\n",
       "      <td>Experts Agree: Harper distorts data, misleads ...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>pr36</th>\n",
       "      <td>2015-08-05T00:00:00</td>\n",
       "      <td>For immediate release Vote Harper to stop a Ne...</td>\n",
       "      <td>http://www.conservative.ca/no-netflix-tax/</td>\n",
       "      <td>conservative</td>\n",
       "      <td>Vote Harper to stop a  Netflix Tax  #nonetflixtax</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>pr813</th>\n",
       "      <td>2015-08-29T00:00:00</td>\n",
       "      <td>OTTAWA  Today  the Liberal Party of Canada lau...</td>\n",
       "      <td>https://www.liberal.ca/liberals-launch-two-can...</td>\n",
       "      <td>liberal</td>\n",
       "      <td>Liberals launch  Two Candidates  radio ad</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>pr812</th>\n",
       "      <td>2015-08-28T00:00:00</td>\n",
       "      <td>OTTAWA  Stephen Harper still hasnt told Canadi...</td>\n",
       "      <td>https://www.liberal.ca/novaks-denials-raise-fr...</td>\n",
       "      <td>liberal</td>\n",
       "      <td>Novak's denials raise fresh questions, show Ha...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>pr837</th>\n",
       "      <td>2015-09-10T00:00:00</td>\n",
       "      <td>MONTREAL  The Conservative Party of Canada is ...</td>\n",
       "      <td>https://www.liberal.ca/conservative-party-demo...</td>\n",
       "      <td>liberal</td>\n",
       "      <td>Conservative Party demonstrates its disregard ...</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "                         date  \\\n",
       "_rowName                        \n",
       "pr816     2015-08-29T00:00:00   \n",
       "pr36      2015-08-05T00:00:00   \n",
       "pr813     2015-08-29T00:00:00   \n",
       "pr812     2015-08-28T00:00:00   \n",
       "pr837     2015-09-10T00:00:00   \n",
       "\n",
       "                                                  full_text  \\\n",
       "_rowName                                                      \n",
       "pr816     David Dodge  The numbers dont tell you very mu...   \n",
       "pr36      For immediate release Vote Harper to stop a Ne...   \n",
       "pr813     OTTAWA  Today  the Liberal Party of Canada lau...   \n",
       "pr812     OTTAWA  Stephen Harper still hasnt told Canadi...   \n",
       "pr837     MONTREAL  The Conservative Party of Canada is ...   \n",
       "\n",
       "                                                       link         party  \\\n",
       "_rowName                                                                    \n",
       "pr816     https://www.liberal.ca/experts-agree-harper-di...       liberal   \n",
       "pr36             http://www.conservative.ca/no-netflix-tax/  conservative   \n",
       "pr813     https://www.liberal.ca/liberals-launch-two-can...       liberal   \n",
       "pr812     https://www.liberal.ca/novaks-denials-raise-fr...       liberal   \n",
       "pr837     https://www.liberal.ca/conservative-party-demo...       liberal   \n",
       "\n",
       "                                                      title  \n",
       "_rowName                                                     \n",
       "pr816     Experts Agree: Harper distorts data, misleads ...  \n",
       "pr36      Vote Harper to stop a  Netflix Tax  #nonetflixtax  \n",
       "pr813             Liberals launch  Two Candidates  radio ad  \n",
       "pr812     Novak's denials raise fresh questions, show Ha...  \n",
       "pr837     Conservative Party demonstrates its disregard ...  "
      ]
     },
     "execution_count": 3,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "mldb.query('SELECT * FROM raw LIMIT 5')"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Exploring the data"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Interested in knowing which parties have had the more press releases during the campaing? Easy!"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>count</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>_rowName</th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>liberal</th>\n",
       "      <td>283</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>ndp</th>\n",
       "      <td>156</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>conservative</th>\n",
       "      <td>101</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>green</th>\n",
       "      <td>89</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "              count\n",
       "_rowName           \n",
       "liberal         283\n",
       "ndp             156\n",
       "conservative    101\n",
       "green            89"
      ]
     },
     "execution_count": 4,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "mldb.query(\"\"\"\n",
    "SELECT count(*) as count\n",
    "NAMED party\n",
    "FROM raw \n",
    "GROUP BY party\n",
    "ORDER BY count DESC\n",
    "\"\"\")"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Before continuing, we will create a dataset of dummy articles that are in fact recurring themes we have observed in the data. We will add those to the data to see where they map on the final plot."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "<Response [201]>\n"
     ]
    }
   ],
   "source": [
    "print mldb.post('/v1/procedures', {\n",
    "    'type': 'transform',\n",
    "    'params': {\n",
    "        'inputData': \"\"\"\n",
    "        SELECT\n",
    "            column AS full_text,\n",
    "            column AS title,\n",
    "            'keyword' AS party\n",
    "        NAMED 'kw' + rowName()\n",
    "        FROM (SELECT * FROM row_dataset({\n",
    "            \"Justin Trudeau\": 1,\n",
    "            \"middle class\": 1,\n",
    "            \"syrian refugees\": 1,\n",
    "            \"terrorism\": 1,\n",
    "            \"infrastructures\": 1,\n",
    "            \"health\": 1,\n",
    "            \"crime\": 1,\n",
    "            \"jobs\": 1,\n",
    "            \"education\": 1,\n",
    "            \"oil\": 1,\n",
    "            \"deficit\":1,\n",
    "            \"youth\": 1,\n",
    "            \"holidays\": 1,\n",
    "            \"scandal\": 1,\n",
    "            \"tax cuts\": 1,\n",
    "            \"first nations\": 1,\n",
    "            \"debate\": 1,\n",
    "            \"small businesses\": 1,\n",
    "            \"military\": 1\n",
    "            \n",
    "        }))\n",
    "        \"\"\",\n",
    "        'outputDataset': {'id': 'keywords', 'type': 'tabular'}\n",
    "    }\n",
    "})"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "And here is what that fancy API call built"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>full_text</th>\n",
       "      <th>party</th>\n",
       "      <th>title</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>_rowName</th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>kw9</th>\n",
       "      <td>jobs</td>\n",
       "      <td>keyword</td>\n",
       "      <td>jobs</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>kw8</th>\n",
       "      <td>infrastructures</td>\n",
       "      <td>keyword</td>\n",
       "      <td>infrastructures</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>kw7</th>\n",
       "      <td>holidays</td>\n",
       "      <td>keyword</td>\n",
       "      <td>holidays</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>kw6</th>\n",
       "      <td>health</td>\n",
       "      <td>keyword</td>\n",
       "      <td>health</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>kw5</th>\n",
       "      <td>first nations</td>\n",
       "      <td>keyword</td>\n",
       "      <td>first nations</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "                full_text    party            title\n",
       "_rowName                                           \n",
       "kw9                  jobs  keyword             jobs\n",
       "kw8       infrastructures  keyword  infrastructures\n",
       "kw7              holidays  keyword         holidays\n",
       "kw6                health  keyword           health\n",
       "kw5         first nations  keyword    first nations"
      ]
     },
     "execution_count": 6,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "mldb.query('SELECT * FROM keywords LIMIT 5')"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Creating bags of words\n",
    "\n",
    "The next step is to take the `full_text` column and tokenize its contents. We do this because we will need to compare press releases using their content word by word.\n",
    "\n",
    "The [`tokenize`](../../../../doc/#builtin/sql/ValueExpression.md.html#builtinfunctions) function first splits the columns into (lowercased) individual words, removing words with a length of less than 3 characters. We then remove a list of [stopwords](../../../../doc/#builtin/functions/FilterStopWords.md.html) (such as \"and\", \"to\", \"the\", etc.).\n",
    "\n",
    "We do this on the [`merge`d](../../../../doc/#builtin/sql/FromExpression.md.html) dataset comprised of the press releases and of our keywords."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "<Response [201]>\n",
      "<Response [201]>\n"
     ]
    }
   ],
   "source": [
    "print mldb.put('/v1/functions/filter_stopwords', {\n",
    "    'type': 'filter_stopwords'\n",
    "})\n",
    "\n",
    "print mldb.post('/v1/procedures', {\n",
    "    'type': 'transform',\n",
    "    'params': {\n",
    "        'inputData': \"\"\"\n",
    "            SELECT\n",
    "                filter_stopwords({\n",
    "                    words: {\n",
    "                        tokenize(\n",
    "                            lower(full_text),\n",
    "                            {splitChars: ' -''\"?!;:/[]*,.',\n",
    "                             minTokenLength: 3}\n",
    "                        ) as *\n",
    "                    }\n",
    "                })[words] as *\n",
    "            FROM merge(raw, keywords)\n",
    "            WHERE party = 'keyword'\n",
    "                           OR (full_text IS NOT NULL\n",
    "                               AND title IS NOT NULL)\n",
    "            \"\"\",\n",
    "        'outputDataset': 'bag_of_words'\n",
    "    }\n",
    "})"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "The result is a clean list of words that will be easy to compare across press releases. Cells that contain a number represent the number of times that word was in the press release while cells containing `NaN` indicate that the press release did not contain the given word. Because MLDB supports sparse datasets, it is more efficient to simply not record anything when a word is not in a press release, rather than write an explicit \"0\" in the dataset."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {
    "collapsed": false,
    "scrolled": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>aid</th>\n",
       "      <th>alleviate</th>\n",
       "      <th>assistance</th>\n",
       "      <th>budget</th>\n",
       "      <th>build</th>\n",
       "      <th>canada</th>\n",
       "      <th>canadas</th>\n",
       "      <th>canadian</th>\n",
       "      <th>canadians</th>\n",
       "      <th>cases</th>\n",
       "      <th>...</th>\n",
       "      <th>settle</th>\n",
       "      <th>shoulder</th>\n",
       "      <th>sponsors</th>\n",
       "      <th>spring</th>\n",
       "      <th>strain</th>\n",
       "      <th>subject</th>\n",
       "      <th>syrian</th>\n",
       "      <th>trust</th>\n",
       "      <th>warned</th>\n",
       "      <th>working</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>_rowName</th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>pr432</th>\n",
       "      <td>2</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>2</td>\n",
       "      <td>2</td>\n",
       "      <td>2</td>\n",
       "      <td>2</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>...</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>pr611</th>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>2</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>1</td>\n",
       "      <td>3</td>\n",
       "      <td>NaN</td>\n",
       "      <td>...</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>pr423</th>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>1</td>\n",
       "      <td>5</td>\n",
       "      <td>1</td>\n",
       "      <td>2</td>\n",
       "      <td>NaN</td>\n",
       "      <td>...</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>pr809</th>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>2</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>...</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>pr558</th>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>6</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>3</td>\n",
       "      <td>NaN</td>\n",
       "      <td>...</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>2</td>\n",
       "      <td>3</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>5 rows × 400 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "          aid  alleviate  assistance  budget  build  canada  canadas  \\\n",
       "_rowName                                                               \n",
       "pr432       2          1           1       1      2       2        2   \n",
       "pr611     NaN        NaN           2     NaN    NaN     NaN      NaN   \n",
       "pr423     NaN        NaN         NaN     NaN    NaN       1        5   \n",
       "pr809     NaN        NaN         NaN       1      1       2        1   \n",
       "pr558     NaN        NaN         NaN     NaN    NaN       6      NaN   \n",
       "\n",
       "          canadian  canadians  cases   ...     settle  shoulder  sponsors  \\\n",
       "_rowName                               ...                                  \n",
       "pr432            2          1      1   ...        NaN       NaN       NaN   \n",
       "pr611            1          3    NaN   ...        NaN       NaN       NaN   \n",
       "pr423            1          2    NaN   ...        NaN       NaN       NaN   \n",
       "pr809            1        NaN    NaN   ...        NaN       NaN       NaN   \n",
       "pr558          NaN          3    NaN   ...          1         1         1   \n",
       "\n",
       "          spring  strain  subject  syrian  trust  warned  working  \n",
       "_rowName                                                           \n",
       "pr432        NaN     NaN      NaN     NaN    NaN     NaN      NaN  \n",
       "pr611        NaN     NaN      NaN     NaN    NaN     NaN      NaN  \n",
       "pr423        NaN     NaN      NaN     NaN    NaN     NaN      NaN  \n",
       "pr809        NaN     NaN      NaN     NaN    NaN     NaN      NaN  \n",
       "pr558          1       1        2       3      1       1        1  \n",
       "\n",
       "[5 rows x 400 columns]"
      ]
     },
     "execution_count": 8,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "mldb.query(\"SELECT * FROM bag_of_words LIMIT 5\")"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "We can easily answer some questions from that new dataset with simple queries, like what are the most common words in our press releases."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "/usr/local/lib/python2.7/dist-packages/matplotlib/font_manager.py:273: UserWarning: Matplotlib is building the font cache using fc-list. This may take a moment.\n",
      "  warnings.warn('Matplotlib is building the font cache using fc-list. This may take a moment.')\n"
     ]
    },
    {
     "data": {
      "text/plain": [
       "<matplotlib.axes._subplots.AxesSubplot at 0x7f3eb4f8f5d0>"
      ]
     },
     "execution_count": 9,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAA7QAAAFrCAYAAADhMMV9AAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzs3XmYXGWZ///3B4ggIIsOtKLYgPIVkGXYVVBaFHXclUGd\nQeSLOq4jOqOo1ygmYUbRcRf9uYCC4zaAggL+ZBlNoSJ7gIAgMzoJrh0cCYKMRiD39486CZUmnXRC\nVXeq6v26rnP1OU895zl3VbjovuvZUlVIkiRJktRvNpjpACRJkiRJWhcmtJIkSZKkvmRCK0mSJEnq\nSya0kiRJkqS+ZEIrSZIkSepLJrSSJEmSpL600UwHMEySuEeSJEmSpKFWVelWWya008x9fzVVc+bM\nYc6cOTMdhvqA/61obfjfi6bK/1a0NvzvRVOVdC2XBRxyLEmSJEnqUya0kiRJkqS+lGEfApvkaGDf\nqjo2yWuBu6rqyz161nB/2JIkSdIEIyOjjI8vmukwNE2SOIe2V6rqs9PwlN4/QpIkSeoTixd3d06l\nhst6O+Q4ySuSXJfkmiRfTPLcJJcluTrJhUm2aerNTvL5JPOS/DTJmzraOD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f/CJPfvKTOe6443jo\nQx/KYx7zGM4///wVz1yyZAmvfOUreeQjH8nDHvYwXvziF6947bzzzmPvvfdm66235uCDD+b6669f\n8doHPvABHvWoR7HFFluw6667Mm/evLX6t+kFe2glSZIkDZQzzzyTCy+8kI033pgnPelJnHbaaTzu\ncY9jfHyc2267jV//+tdceumlPPvZz2b//fdn5513nrStv//7v+fOO+9k0aJF/Pa3v+UZz3gG2/2/\n9u4/uMrqzuP4+xMIhlBTk0UD0SQr1BTRcd2o7Kojw1TW1RXosiuCCEJEZhl166/qUmkHtd1KGS3i\nLFvRZZEfLgLtuuiAP2qFwspSRFCqYqFgk8gPFQJowOHnd/+4j/EakkA0JCZ8XjPP8Dznnufcc+/9\ncnO/95x7noICysrKmD9/Pg888AALFiygtLSUTZs2kZmZyeHDh+nXrx99+/blqaeeIiMjg1WrVtW0\nWXt0tfbx7NmzeeGFFygpKalJdGuXDRo0iK5du7Jp0yaqq6vp168fRUVFjB49GoCVK1dSVlbGjh07\nmDp1KqNGjWLz5s0ADBs2jJycHNatW0enTp1Yvnw5AGvWrGHUqFEsXLiQCy64gNmzZzNgwADWr1/P\ne++9x5QpU3j99dfJz8+noqKCQ4cOffUX6yvyCK2ZmZmZmbUpt912G/n5+Zxyyin079+/ZtRUEj/+\n8Y/JzMykd+/eXH311cybN6/edg4fPszcuXOZMGEC2dnZFBcXc9dddzFr1iwApk2bxj333ENpaSkA\n3bp1o7CwkJUrV7J161YmTpxIVlYWHTp04JJLLjnm/o8cOZIePXqQkZFB+/btjyirqqri+eefZ9Kk\nSWRlZdG5c2duv/125syZU9NGcXExN954I5IYMWIEW7du5cMPP2Tbtm28+OKLTJ06lZycHNq1a8dl\nl10GpEabx4wZw4UXXogkhg8fzkknncSKFSto164d+/fv56233uLgwYMUFRVx5plnNu6FOQ6c0JqZ\nmZmZWZuSn59fs5+dnU11dTUAubm5ZGVl1dxWXFzMli1b6m1n+/btNclb+jmfjXRWVlbSvXv3I86r\nrKykuLiYjIwvl27V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5GU2QksmeL1S2BWRCxIij+QlJ/c3gX4MCnfDBSmne4YOnFcCgyQtAmYA3xH0ixgm2PF6vA+\nUBkRq5LjX5FKcP3eYrVdCLwaEVURcQh4BrgEx4o1rLHx4bg5wUkaSepnU0PTips0XpzQNo/XgG9J\nKpbUARgCPNvCfbKW95/AOxExOa3sWWBksj8CWJBWPiRZgfJM4FvAyubqqLWciLg3Iooiohup945X\nImI48ByOFaslmQpYKakkKboceBu/t9iR/gD8taSsZDGWy0ktPOdYsXTii7ODGhUfybTk3ZJ6JXF2\nQ9o51vZ8IV4kXUnqJ1MDImJfWr0mjZf2TfkIrG4RcUjSraRW+soApkXEuhbulrUgSZcC1wO/l7SG\n1JSde4GfAfMk3QiUk1oBjoh4R9I8Uh82DgA3R4Sn+ZzYJuBYsbp9D3hKUiawCSgD2uF4sTQR8aak\nmUOHjswAAACkSURBVMDrwCFgDfA4cDKOFQMk/RfQB/gzSRXAeFJ/e+Y3Mj5uAZ4EskitwP5Ccz4O\nax71xMu9QAfg18kixisi4uamjhf5vcjMzMzMzMxaI085NjMzMzMzs1bJCa2ZmZmZmZm1Sk5ozczM\nzMzMrFVyQmtmZmZmZmatkhNaMzMzMzMza5Wc0JqZmZmZmVmr5ITWzMzMzMzMWiUntGZmZmZmZtYq\n/T8uq0yVlJt/rAAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<matplotlib.figure.Figure at 0x7f3eb5236b50>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "%matplotlib inline\n",
    "mldb.query(\"\"\"\n",
    "SELECT *\n",
    "FROM transpose((\n",
    "    SELECT sum({*}) as *\n",
    "    NAMED 'nb_occurrences'\n",
    "    FROM bag_of_words\n",
    "    WHERE rowName() NOT LIKE 'kw%' -- ignoring the keyword rows we added\n",
    "))\n",
    "ORDER BY nb_occurrences DESC\n",
    "LIMIT 20\n",
    "\"\"\").sort_values('nb_occurrences', ascending=True).plot(kind='barh', figsize=(15,6))"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "collapsed": true
   },
   "source": [
    "## Use word2vec to embed our bag of words"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "collapsed": true
   },
   "source": [
    "The [word2vec tool](http://arxiv.org/pdf/1301.3781v3.pdf) is used to embed words into a high dimensional space. Concretely, this means that we can map words into a 300-dimensions space in which \"similar\" words will be close, and \"dissimilar\" words will be far away.\n",
    "\n",
    "You can obtain the trained word2vec embedding [here](https://code.google.com/p/word2vec). Since the original data is quite big, and we really just need a small subset of it (the coordinates for the words that actually appear in our press releases), we are going to load only that portion, that we have extracted beforehand."
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### Load (a subset of) the trained word2vec data"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "<Response [201]>\n"
     ]
    }
   ],
   "source": [
    "print mldb.post('/v1/procedures', {\n",
    "    'type': 'import.text',\n",
    "    'params': {\n",
    "        'dataFileUrl': 'http://public.mldb.ai/datasets/press_releases/GoogleNewsEmbedding_ElectionsDemo.csv.gz',\n",
    "        'outputDataset': 'w2v',\n",
    "        'select': '* EXCLUDING(word)',\n",
    "        'named': 'word'\n",
    "    }\n",
    "})"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Here is what it looks like."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>0</th>\n",
       "      <th>1</th>\n",
       "      <th>2</th>\n",
       "      <th>3</th>\n",
       "      <th>4</th>\n",
       "      <th>5</th>\n",
       "      <th>6</th>\n",
       "      <th>7</th>\n",
       "      <th>8</th>\n",
       "      <th>9</th>\n",
       "      <th>...</th>\n",
       "      <th>290</th>\n",
       "      <th>291</th>\n",
       "      <th>292</th>\n",
       "      <th>293</th>\n",
       "      <th>294</th>\n",
       "      <th>295</th>\n",
       "      <th>296</th>\n",
       "      <th>297</th>\n",
       "      <th>298</th>\n",
       "      <th>299</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>_rowName</th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>preoccupied</th>\n",
       "      <td>0.527344</td>\n",
       "      <td>0.333984</td>\n",
       "      <td>-0.080078</td>\n",
       "      <td>0.102539</td>\n",
       "      <td>-0.369141</td>\n",
       "      <td>0.386719</td>\n",
       "      <td>0.339844</td>\n",
       "      <td>-0.247070</td>\n",
       "      <td>0.128906</td>\n",
       "      <td>-0.142578</td>\n",
       "      <td>...</td>\n",
       "      <td>-0.145508</td>\n",
       "      <td>-0.083984</td>\n",
       "      <td>0.154297</td>\n",
       "      <td>0.008606</td>\n",
       "      <td>-0.365234</td>\n",
       "      <td>-0.189453</td>\n",
       "      <td>-0.036621</td>\n",
       "      <td>0.010315</td>\n",
       "      <td>0.141602</td>\n",
       "      <td>0.194336</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>prepare</th>\n",
       "      <td>-0.143555</td>\n",
       "      <td>0.216797</td>\n",
       "      <td>0.013916</td>\n",
       "      <td>-0.241211</td>\n",
       "      <td>0.034180</td>\n",
       "      <td>0.084961</td>\n",
       "      <td>-0.206055</td>\n",
       "      <td>-0.014343</td>\n",
       "      <td>0.025635</td>\n",
       "      <td>-0.162109</td>\n",
       "      <td>...</td>\n",
       "      <td>-0.324219</td>\n",
       "      <td>-0.201172</td>\n",
       "      <td>-0.298828</td>\n",
       "      <td>0.063965</td>\n",
       "      <td>-0.032715</td>\n",
       "      <td>-0.108398</td>\n",
       "      <td>-0.143555</td>\n",
       "      <td>-0.046631</td>\n",
       "      <td>0.042480</td>\n",
       "      <td>-0.018066</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>prepared</th>\n",
       "      <td>-0.132812</td>\n",
       "      <td>0.138672</td>\n",
       "      <td>0.049561</td>\n",
       "      <td>-0.040283</td>\n",
       "      <td>-0.115723</td>\n",
       "      <td>0.027466</td>\n",
       "      <td>0.011292</td>\n",
       "      <td>-0.036865</td>\n",
       "      <td>0.173828</td>\n",
       "      <td>-0.078125</td>\n",
       "      <td>...</td>\n",
       "      <td>-0.296875</td>\n",
       "      <td>-0.330078</td>\n",
       "      <td>-0.298828</td>\n",
       "      <td>0.094727</td>\n",
       "      <td>-0.079590</td>\n",
       "      <td>0.000805</td>\n",
       "      <td>-0.105957</td>\n",
       "      <td>0.036865</td>\n",
       "      <td>-0.035645</td>\n",
       "      <td>-0.215820</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>preparedness</th>\n",
       "      <td>0.081055</td>\n",
       "      <td>0.095703</td>\n",
       "      <td>0.151367</td>\n",
       "      <td>0.089355</td>\n",
       "      <td>0.035889</td>\n",
       "      <td>0.083008</td>\n",
       "      <td>-0.089355</td>\n",
       "      <td>-0.162109</td>\n",
       "      <td>0.394531</td>\n",
       "      <td>-0.115234</td>\n",
       "      <td>...</td>\n",
       "      <td>-0.376953</td>\n",
       "      <td>-0.285156</td>\n",
       "      <td>-0.277344</td>\n",
       "      <td>0.022705</td>\n",
       "      <td>0.215820</td>\n",
       "      <td>-0.149414</td>\n",
       "      <td>-0.000492</td>\n",
       "      <td>-0.208008</td>\n",
       "      <td>-0.109863</td>\n",
       "      <td>0.152344</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>prepares</th>\n",
       "      <td>0.215820</td>\n",
       "      <td>0.238281</td>\n",
       "      <td>0.117676</td>\n",
       "      <td>-0.333984</td>\n",
       "      <td>-0.007935</td>\n",
       "      <td>-0.102539</td>\n",
       "      <td>-0.044189</td>\n",
       "      <td>-0.166016</td>\n",
       "      <td>0.038818</td>\n",
       "      <td>-0.106934</td>\n",
       "      <td>...</td>\n",
       "      <td>-0.298828</td>\n",
       "      <td>-0.449219</td>\n",
       "      <td>-0.384766</td>\n",
       "      <td>0.185547</td>\n",
       "      <td>-0.246094</td>\n",
       "      <td>0.075684</td>\n",
       "      <td>0.156250</td>\n",
       "      <td>0.012695</td>\n",
       "      <td>0.043945</td>\n",
       "      <td>0.158203</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>5 rows × 300 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "                     0         1         2         3         4         5  \\\n",
       "_rowName                                                                   \n",
       "preoccupied   0.527344  0.333984 -0.080078  0.102539 -0.369141  0.386719   \n",
       "prepare      -0.143555  0.216797  0.013916 -0.241211  0.034180  0.084961   \n",
       "prepared     -0.132812  0.138672  0.049561 -0.040283 -0.115723  0.027466   \n",
       "preparedness  0.081055  0.095703  0.151367  0.089355  0.035889  0.083008   \n",
       "prepares      0.215820  0.238281  0.117676 -0.333984 -0.007935 -0.102539   \n",
       "\n",
       "                     6         7         8         9    ...          290  \\\n",
       "_rowName                                                ...                \n",
       "preoccupied   0.339844 -0.247070  0.128906 -0.142578    ...    -0.145508   \n",
       "prepare      -0.206055 -0.014343  0.025635 -0.162109    ...    -0.324219   \n",
       "prepared      0.011292 -0.036865  0.173828 -0.078125    ...    -0.296875   \n",
       "preparedness -0.089355 -0.162109  0.394531 -0.115234    ...    -0.376953   \n",
       "prepares     -0.044189 -0.166016  0.038818 -0.106934    ...    -0.298828   \n",
       "\n",
       "                   291       292       293       294       295       296  \\\n",
       "_rowName                                                                   \n",
       "preoccupied  -0.083984  0.154297  0.008606 -0.365234 -0.189453 -0.036621   \n",
       "prepare      -0.201172 -0.298828  0.063965 -0.032715 -0.108398 -0.143555   \n",
       "prepared     -0.330078 -0.298828  0.094727 -0.079590  0.000805 -0.105957   \n",
       "preparedness -0.285156 -0.277344  0.022705  0.215820 -0.149414 -0.000492   \n",
       "prepares     -0.449219 -0.384766  0.185547 -0.246094  0.075684  0.156250   \n",
       "\n",
       "                   297       298       299  \n",
       "_rowName                                    \n",
       "preoccupied   0.010315  0.141602  0.194336  \n",
       "prepare      -0.046631  0.042480 -0.018066  \n",
       "prepared      0.036865 -0.035645 -0.215820  \n",
       "preparedness -0.208008 -0.109863  0.152344  \n",
       "prepares      0.012695  0.043945  0.158203  \n",
       "\n",
       "[5 rows x 300 columns]"
      ]
     },
     "execution_count": 11,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "mldb.query(\"SELECT * FROM w2v LIMIT 5\")"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### Compute the embedding for all press releases\n",
    "\n",
    "Word2vec gives us word embeddings, but since we are interested is press releases, we need to find a way to embed the document itself in the space. The most obvious way is to take the centroid of all the words in a document as the representation of that document in the 300-dimensions space.\n",
    "\n",
    "We can achieve this using a [`pooling` function](../../../../doc/#builtin/functions/Pooling.md.html)."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "<Response [201]>\n"
     ]
    }
   ],
   "source": [
    "print mldb.put('/v1/functions/pool', {\n",
    "    'type': 'pooling',\n",
    "    'params': {\n",
    "        'aggregators': ['avg'],\n",
    "        'embeddingDataset': 'w2v'\n",
    "    }\n",
    "})"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 13,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "<Response [201]>\n"
     ]
    }
   ],
   "source": [
    "print mldb.post('/v1/procedures', {\n",
    "    'type': 'transform',\n",
    "    'params': {\n",
    "        'inputData': \"\"\"\n",
    "            SELECT pool({words: {*}})[embedding] AS *\n",
    "            FROM bag_of_words\n",
    "        \"\"\",\n",
    "        'outputDataset': 'word2vec'\n",
    "    }\n",
    "})"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "In the new `word2vec` dataset, each row is still a press release and the columns are the word2vec coordinates."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 14,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>0</th>\n",
       "      <th>1</th>\n",
       "      <th>2</th>\n",
       "      <th>3</th>\n",
       "      <th>4</th>\n",
       "      <th>5</th>\n",
       "      <th>6</th>\n",
       "      <th>7</th>\n",
       "      <th>8</th>\n",
       "      <th>9</th>\n",
       "      <th>...</th>\n",
       "      <th>290</th>\n",
       "      <th>291</th>\n",
       "      <th>292</th>\n",
       "      <th>293</th>\n",
       "      <th>294</th>\n",
       "      <th>295</th>\n",
       "      <th>296</th>\n",
       "      <th>297</th>\n",
       "      <th>298</th>\n",
       "      <th>299</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>_rowName</th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>pr865</th>\n",
       "      <td>0.032759</td>\n",
       "      <td>0.019920</td>\n",
       "      <td>0.006550</td>\n",
       "      <td>0.078991</td>\n",
       "      <td>-0.036144</td>\n",
       "      <td>-0.028015</td>\n",
       "      <td>-0.065795</td>\n",
       "      <td>-0.097013</td>\n",
       "      <td>0.065641</td>\n",
       "      <td>0.042858</td>\n",
       "      <td>...</td>\n",
       "      <td>-0.055686</td>\n",
       "      <td>-0.054643</td>\n",
       "      <td>-0.111739</td>\n",
       "      <td>0.002409</td>\n",
       "      <td>0.049028</td>\n",
       "      <td>-0.095925</td>\n",
       "      <td>0.054815</td>\n",
       "      <td>-0.028988</td>\n",
       "      <td>0.009976</td>\n",
       "      <td>0.072976</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>pr107</th>\n",
       "      <td>0.021380</td>\n",
       "      <td>0.057331</td>\n",
       "      <td>-0.001837</td>\n",
       "      <td>0.093658</td>\n",
       "      <td>-0.047274</td>\n",
       "      <td>-0.076754</td>\n",
       "      <td>0.024035</td>\n",
       "      <td>-0.061771</td>\n",
       "      <td>0.096272</td>\n",
       "      <td>0.053844</td>\n",
       "      <td>...</td>\n",
       "      <td>-0.111051</td>\n",
       "      <td>0.037341</td>\n",
       "      <td>-0.068267</td>\n",
       "      <td>-0.008281</td>\n",
       "      <td>-0.063625</td>\n",
       "      <td>0.036184</td>\n",
       "      <td>0.020795</td>\n",
       "      <td>0.003599</td>\n",
       "      <td>0.057439</td>\n",
       "      <td>-0.046436</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>pr896</th>\n",
       "      <td>-0.019961</td>\n",
       "      <td>0.041906</td>\n",
       "      <td>0.011823</td>\n",
       "      <td>0.085196</td>\n",
       "      <td>-0.022192</td>\n",
       "      <td>-0.036619</td>\n",
       "      <td>0.022390</td>\n",
       "      <td>-0.045063</td>\n",
       "      <td>0.084555</td>\n",
       "      <td>0.008020</td>\n",
       "      <td>...</td>\n",
       "      <td>-0.101178</td>\n",
       "      <td>0.041783</td>\n",
       "      <td>-0.078824</td>\n",
       "      <td>0.016356</td>\n",
       "      <td>-0.018967</td>\n",
       "      <td>0.017145</td>\n",
       "      <td>-0.025893</td>\n",
       "      <td>-0.007047</td>\n",
       "      <td>0.081595</td>\n",
       "      <td>-0.054728</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>pr607</th>\n",
       "      <td>-0.030708</td>\n",
       "      <td>0.021404</td>\n",
       "      <td>0.012121</td>\n",
       "      <td>0.063508</td>\n",
       "      <td>-0.028359</td>\n",
       "      <td>-0.103746</td>\n",
       "      <td>0.012344</td>\n",
       "      <td>-0.067797</td>\n",
       "      <td>0.091136</td>\n",
       "      <td>0.031186</td>\n",
       "      <td>...</td>\n",
       "      <td>-0.077244</td>\n",
       "      <td>0.038484</td>\n",
       "      <td>-0.052104</td>\n",
       "      <td>0.013892</td>\n",
       "      <td>-0.066669</td>\n",
       "      <td>0.011444</td>\n",
       "      <td>0.015818</td>\n",
       "      <td>-0.017750</td>\n",
       "      <td>0.007186</td>\n",
       "      <td>-0.012422</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>pr249</th>\n",
       "      <td>-0.012412</td>\n",
       "      <td>0.034083</td>\n",
       "      <td>-0.012667</td>\n",
       "      <td>0.034469</td>\n",
       "      <td>-0.007789</td>\n",
       "      <td>-0.042657</td>\n",
       "      <td>0.013638</td>\n",
       "      <td>-0.087379</td>\n",
       "      <td>0.070248</td>\n",
       "      <td>0.029023</td>\n",
       "      <td>...</td>\n",
       "      <td>-0.143397</td>\n",
       "      <td>0.030871</td>\n",
       "      <td>-0.095722</td>\n",
       "      <td>0.003331</td>\n",
       "      <td>-0.016976</td>\n",
       "      <td>0.007648</td>\n",
       "      <td>0.040113</td>\n",
       "      <td>-0.035733</td>\n",
       "      <td>0.060266</td>\n",
       "      <td>0.003928</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>5 rows × 300 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "                 0         1         2         3         4         5  \\\n",
       "_rowName                                                               \n",
       "pr865     0.032759  0.019920  0.006550  0.078991 -0.036144 -0.028015   \n",
       "pr107     0.021380  0.057331 -0.001837  0.093658 -0.047274 -0.076754   \n",
       "pr896    -0.019961  0.041906  0.011823  0.085196 -0.022192 -0.036619   \n",
       "pr607    -0.030708  0.021404  0.012121  0.063508 -0.028359 -0.103746   \n",
       "pr249    -0.012412  0.034083 -0.012667  0.034469 -0.007789 -0.042657   \n",
       "\n",
       "                 6         7         8         9    ...          290  \\\n",
       "_rowName                                            ...                \n",
       "pr865    -0.065795 -0.097013  0.065641  0.042858    ...    -0.055686   \n",
       "pr107     0.024035 -0.061771  0.096272  0.053844    ...    -0.111051   \n",
       "pr896     0.022390 -0.045063  0.084555  0.008020    ...    -0.101178   \n",
       "pr607     0.012344 -0.067797  0.091136  0.031186    ...    -0.077244   \n",
       "pr249     0.013638 -0.087379  0.070248  0.029023    ...    -0.143397   \n",
       "\n",
       "               291       292       293       294       295       296  \\\n",
       "_rowName                                                               \n",
       "pr865    -0.054643 -0.111739  0.002409  0.049028 -0.095925  0.054815   \n",
       "pr107     0.037341 -0.068267 -0.008281 -0.063625  0.036184  0.020795   \n",
       "pr896     0.041783 -0.078824  0.016356 -0.018967  0.017145 -0.025893   \n",
       "pr607     0.038484 -0.052104  0.013892 -0.066669  0.011444  0.015818   \n",
       "pr249     0.030871 -0.095722  0.003331 -0.016976  0.007648  0.040113   \n",
       "\n",
       "               297       298       299  \n",
       "_rowName                                \n",
       "pr865    -0.028988  0.009976  0.072976  \n",
       "pr107     0.003599  0.057439 -0.046436  \n",
       "pr896    -0.007047  0.081595 -0.054728  \n",
       "pr607    -0.017750  0.007186 -0.012422  \n",
       "pr249    -0.035733  0.060266  0.003928  \n",
       "\n",
       "[5 rows x 300 columns]"
      ]
     },
     "execution_count": 14,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "mldb.query(\"SELECT * FROM word2vec LIMIT 5\")"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "collapsed": false
   },
   "source": [
    "## Use t-SNE for dimensionality reduction\n",
    "\n",
    "The [t-SNE algorithm](http://lvdmaaten.github.io/tsne/) is a very powerful technique that can be used to reduce the dimensionality of data to 2D or 3D, typically to visualize it. We will use it to map our press releases on a 2D scatter plot."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 15,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "<Response [201]>\n"
     ]
    }
   ],
   "source": [
    "print mldb.post('/v1/procedures', {\n",
    "    'type': 'tsne.train',\n",
    "    'params': {\n",
    "        'trainingData': 'SELECT * FROM word2vec',\n",
    "        'rowOutputDataset': 'tsne',\n",
    "        'perplexity': 5,\n",
    "        'modelFileUrl': 'file://pr_tsne.bin.gz'\n",
    "    }\n",
    "})"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 16,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>x</th>\n",
       "      <th>y</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>_rowName</th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>pr189</th>\n",
       "      <td>-20.069212</td>\n",
       "      <td>-13.740768</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>pr201</th>\n",
       "      <td>-26.396029</td>\n",
       "      <td>-36.491875</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>pr19</th>\n",
       "      <td>15.770018</td>\n",
       "      <td>-51.777973</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>pr803</th>\n",
       "      <td>22.519440</td>\n",
       "      <td>48.915726</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>pr915</th>\n",
       "      <td>-44.215103</td>\n",
       "      <td>-74.324722</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "                  x          y\n",
       "_rowName                      \n",
       "pr189    -20.069212 -13.740768\n",
       "pr201    -26.396029 -36.491875\n",
       "pr19      15.770018 -51.777973\n",
       "pr803     22.519440  48.915726\n",
       "pr915    -44.215103 -74.324722"
      ]
     },
     "execution_count": 16,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "mldb.query(\"SELECT * FROM tsne LIMIT 5\")"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Doing the scatter plot\n",
    "\n",
    "We now have the `tsne` dataset that represents all of our press releases with $(x,y)$ coordinates in the embedding space. It is now very easy to merge those coordinates with both the press releases and our keywords."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 17,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>party</th>\n",
       "      <th>title</th>\n",
       "      <th>x</th>\n",
       "      <th>y</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>_rowName</th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>pr10</th>\n",
       "      <td>conservative</td>\n",
       "      <td>Conservatives Target World's Human Rights Abus...</td>\n",
       "      <td>13.226810</td>\n",
       "      <td>-48.083923</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>pr100</th>\n",
       "      <td>conservative</td>\n",
       "      <td>Hold On To Your Wallet: Justin Trudeau's Real ...</td>\n",
       "      <td>16.333181</td>\n",
       "      <td>38.655582</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>pr101</th>\n",
       "      <td>conservative</td>\n",
       "      <td>Statement by the Prime Minister of Canada to c...</td>\n",
       "      <td>66.167328</td>\n",
       "      <td>-38.826836</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>pr102</th>\n",
       "      <td>conservative</td>\n",
       "      <td>Statement by Stephen Harper to mark the start ...</td>\n",
       "      <td>69.897781</td>\n",
       "      <td>-37.149445</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>pr103</th>\n",
       "      <td>conservative</td>\n",
       "      <td>Harper Announces Further Actions To Combat Hum...</td>\n",
       "      <td>23.277555</td>\n",
       "      <td>-89.836121</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "                 party                                              title  \\\n",
       "_rowName                                                                    \n",
       "pr10      conservative  Conservatives Target World's Human Rights Abus...   \n",
       "pr100     conservative  Hold On To Your Wallet: Justin Trudeau's Real ...   \n",
       "pr101     conservative  Statement by the Prime Minister of Canada to c...   \n",
       "pr102     conservative  Statement by Stephen Harper to mark the start ...   \n",
       "pr103     conservative  Harper Announces Further Actions To Combat Hum...   \n",
       "\n",
       "                  x          y  \n",
       "_rowName                        \n",
       "pr10      13.226810 -48.083923  \n",
       "pr100     16.333181  38.655582  \n",
       "pr101     66.167328 -38.826836  \n",
       "pr102     69.897781 -37.149445  \n",
       "pr103     23.277555 -89.836121  "
      ]
     },
     "execution_count": 17,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "pr = mldb.query(\"\"\"\n",
    "SELECT raw.title as title, raw.party as party, tsne.x as x, tsne.y as y\n",
    "NAMED raw.rowName()\n",
    "FROM raw\n",
    "JOIN tsne\n",
    "ON tsne.rowName() = raw.rowName()\n",
    "\"\"\")\n",
    "kw = mldb.query(\"\"\"\n",
    "SELECT keywords.party as party, keywords.title as title, tsne.x as x, tsne.y as y\n",
    "NAMED keywords.rowName()\n",
    "FROM keywords\n",
    "JOIN tsne\n",
    "ON tsne.rowName() = keywords.rowName()\n",
    "\"\"\")\n",
    "pr[:5]"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "And now let's create our final plot! We simply use [Bokeh](http://bokeh.pydata.org) to make a scatter plot of the press releases, where we color each point by the color of its party. We then add our keywords on top of that, using the coordinates given by t-SNE."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 18,
   "metadata": {
    "collapsed": false
   },
   "outputs": [],
   "source": [
    "import bokeh.plotting as bp\n",
    "from bokeh.models import HoverTool"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 19,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "\n",
       "    <div class=\"bk-banner\">\n",
       "        <a href=\"http://bokeh.pydata.org\" target=\"_blank\" class=\"bk-logo bk-logo-small bk-logo-notebook\"></a>\n",
       "        <span id=\"b1819b5a-6fac-4e23-ab23-80cd4dc2e41e\">Loading BokehJS ...</span>\n",
       "    </div>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "application/javascript": [
       "\n",
       "(function(global) {\n",
       "  function now() {\n",
       "    return new Date();\n",
       "  }\n",
       "\n",
       "  if (typeof (window._bokeh_onload_callbacks) === \"undefined\") {\n",
       "    window._bokeh_onload_callbacks = [];\n",
       "  }\n",
       "\n",
       "  function run_callbacks() {\n",
       "    window._bokeh_onload_callbacks.forEach(function(callback) { callback() });\n",
       "    delete window._bokeh_onload_callbacks\n",
       "    console.info(\"Bokeh: all callbacks have finished\");\n",
       "  }\n",
       "\n",
       "  function load_libs(js_urls, callback) {\n",
       "    window._bokeh_onload_callbacks.push(callback);\n",
       "    if (window._bokeh_is_loading > 0) {\n",
       "      console.log(\"Bokeh: BokehJS is being loaded, scheduling callback at\", now());\n",
       "      return null;\n",
       "    }\n",
       "    if (js_urls == null || js_urls.length === 0) {\n",
       "      run_callbacks();\n",
       "      return null;\n",
       "    }\n",
       "    console.log(\"Bokeh: BokehJS not loaded, scheduling load and callback at\", now());\n",
       "    window._bokeh_is_loading = js_urls.length;\n",
       "    for (var i = 0; i < js_urls.length; i++) {\n",
       "      var url = js_urls[i];\n",
       "      var s = document.createElement('script');\n",
       "      s.src = url;\n",
       "      s.async = false;\n",
       "      s.onreadystatechange = s.onload = function() {\n",
       "        window._bokeh_is_loading--;\n",
       "        if (window._bokeh_is_loading === 0) {\n",
       "          console.log(\"Bokeh: all BokehJS libraries loaded\");\n",
       "          run_callbacks()\n",
       "        }\n",
       "      };\n",
       "      s.onerror = function() {\n",
       "        console.warn(\"failed to load library \" + url);\n",
       "      };\n",
       "      console.log(\"Bokeh: injecting script tag for BokehJS library: \", url);\n",
       "      document.getElementsByTagName(\"head\")[0].appendChild(s);\n",
       "    }\n",
       "  };\n",
       "\n",
       "  var js_urls = ['https://cdn.pydata.org/bokeh/release/bokeh-0.11.1.min.js', 'https://cdn.pydata.org/bokeh/release/bokeh-widgets-0.11.1.min.js', 'https://cdn.pydata.org/bokeh/release/bokeh-compiler-0.11.1.min.js'];\n",
       "\n",
       "  var inline_js = [\n",
       "    function(Bokeh) {\n",
       "      Bokeh.set_log_level(\"info\");\n",
       "    },\n",
       "    \n",
       "    function(Bokeh) {\n",
       "      Bokeh.$(\"#b1819b5a-6fac-4e23-ab23-80cd4dc2e41e\").text(\"BokehJS successfully loaded\");\n",
       "    },\n",
       "    function(Bokeh) {\n",
       "      console.log(\"Bokeh: injecting CSS: https://cdn.pydata.org/bokeh/release/bokeh-0.11.1.min.css\");\n",
       "      Bokeh.embed.inject_css(\"https://cdn.pydata.org/bokeh/release/bokeh-0.11.1.min.css\");\n",
       "      console.log(\"Bokeh: injecting CSS: https://cdn.pydata.org/bokeh/release/bokeh-widgets-0.11.1.min.css\");\n",
       "      Bokeh.embed.inject_css(\"https://cdn.pydata.org/bokeh/release/bokeh-widgets-0.11.1.min.css\");\n",
       "    }\n",
       "  ];\n",
       "\n",
       "  function run_inline_js() {\n",
       "    for (var i = 0; i < inline_js.length; i++) {\n",
       "      inline_js[i](window.Bokeh);\n",
       "    }\n",
       "  }\n",
       "\n",
       "  if (window._bokeh_is_loading === 0) {\n",
       "    console.log(\"Bokeh: BokehJS loaded, going straight to plotting\");\n",
       "    run_inline_js();\n",
       "  } else {\n",
       "    load_libs(js_urls, function() {\n",
       "      console.log(\"Bokeh: BokehJS plotting callback run at\", now());\n",
       "      run_inline_js();\n",
       "    });\n",
       "  }\n",
       "}(this));"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "#this line must be in its own cell \n",
    "bp.output_notebook()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 20,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "\n",
       "\n",
       "    <div class=\"plotdiv\" id=\"0c42ca9f-fa34-4748-9f0e-c24f660b3ef9\"></div>\n",
       "<script type=\"text/javascript\">\n",
       "  \n",
       "  (function(global) {\n",
       "    function now() {\n",
       "      return new Date();\n",
       "    }\n",
       "  \n",
       "    if (typeof (window._bokeh_onload_callbacks) === \"undefined\") {\n",
       "      window._bokeh_onload_callbacks = [];\n",
       "    }\n",
       "  \n",
       "    function run_callbacks() {\n",
       "      window._bokeh_onload_callbacks.forEach(function(callback) { callback() });\n",
       "      delete window._bokeh_onload_callbacks\n",
       "      console.info(\"Bokeh: all callbacks have finished\");\n",
       "    }\n",
       "  \n",
       "    function load_libs(js_urls, callback) {\n",
       "      window._bokeh_onload_callbacks.push(callback);\n",
       "      if (window._bokeh_is_loading > 0) {\n",
       "        console.log(\"Bokeh: BokehJS is being loaded, scheduling callback at\", now());\n",
       "        return null;\n",
       "      }\n",
       "      if (js_urls == null || js_urls.length === 0) {\n",
       "        run_callbacks();\n",
       "        return null;\n",
       "      }\n",
       "      console.log(\"Bokeh: BokehJS not loaded, scheduling load and callback at\", now());\n",
       "      window._bokeh_is_loading = js_urls.length;\n",
       "      for (var i = 0; i < js_urls.length; i++) {\n",
       "        var url = js_urls[i];\n",
       "        var s = document.createElement('script');\n",
       "        s.src = url;\n",
       "        s.async = false;\n",
       "        s.onreadystatechange = s.onload = function() {\n",
       "          window._bokeh_is_loading--;\n",
       "          if (window._bokeh_is_loading === 0) {\n",
       "            console.log(\"Bokeh: all BokehJS libraries loaded\");\n",
       "            run_callbacks()\n",
       "          }\n",
       "        };\n",
       "        s.onerror = function() {\n",
       "          console.warn(\"failed to load library \" + url);\n",
       "        };\n",
       "        console.log(\"Bokeh: injecting script tag for BokehJS library: \", url);\n",
       "        document.getElementsByTagName(\"head\")[0].appendChild(s);\n",
       "      }\n",
       "    };var element = document.getElementById(\"0c42ca9f-fa34-4748-9f0e-c24f660b3ef9\");\n",
       "    if (element == null) {\n",
       "      console.log(\"Bokeh: ERROR: autoload.js configured with elementid '0c42ca9f-fa34-4748-9f0e-c24f660b3ef9' but no matching script tag was found. \")\n",
       "      return false;\n",
       "    }\n",
       "  \n",
       "    var js_urls = [];\n",
       "  \n",
       "    var inline_js = [\n",
       "      function(Bokeh) {\n",
       "        Bokeh.$(function() {\n",
       "            var docs_json = {\"74ce27d2-97bd-4b64-9d84-1a5a68ee91d3\":{\"roots\":{\"references\":[{\"attributes\":{\"data_source\":{\"id\":\"a80c7c44-aeba-423a-90dd-3ca378458154\",\"type\":\"ColumnDataSource\"},\"glyph\":{\"id\":\"618508ae-8154-4611-b8ef-ed39ceee7f07\",\"type\":\"Circle\"},\"hover_glyph\":null,\"nonselection_glyph\":{\"id\":\"3504683d-2a33-49ab-bacb-a7ebccf4fa89\",\"type\":\"Circle\"},\"selection_glyph\":null},\"id\":\"b4ece864-27f0-408c-b3ac-c5a561337306\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"legends\":[[\"ndp\",[{\"id\":\"b4ece864-27f0-408c-b3ac-c5a561337306\",\"type\":\"GlyphRenderer\"}]],[\"liberal\",[{\"id\":\"30fb04e8-a7e1-4124-b54b-63e33f36e964\",\"type\":\"GlyphRenderer\"}]],[\"green\",[{\"id\":\"6d3048e8-f94b-4a63-b4cf-3faa3c0753ff\",\"type\":\"GlyphRenderer\"}]],[\"conservative\",[{\"id\":\"d313cde6-26a4-42c7-807b-0443c568522e\",\"type\":\"GlyphRenderer\"}]]],\"plot\":{\"id\":\"95ac976e-5f7f-442d-a348-f8f15f5e1951\",\"subtype\":\"Figure\",\"type\":\"Plot\"}},\"id\":\"d68ddf70-881d-487b-b81b-8871b3c66663\",\"type\":\"Legend\"},{\"attributes\":{\"callback\":null},\"id\":\"90f984d2-a6db-4cf1-94c2-0923bd465cc8\",\"type\":\"DataRange1d\"},{\"attributes\":{\"callback\":null,\"column_names\":[\"y\",\"party\",\"_rowName\",\"x\",\"title\"],\"data\":{\"_rowName\":[\"kw0\",\"kw1\",\"kw10\",\"kw11\",\"kw12\",\"kw13\",\"kw14\",\"kw15\",\"kw16\",\"kw17\",\"kw18\",\"kw2\",\"kw3\",\"kw4\",\"kw5\",\"kw6\",\"kw7\",\"kw8\",\"kw9\"],\"party\":[\"keyword\",\"keyword\",\"keyword\",\"keyword\",\"keyword\",\"keyword\",\"keyword\",\"keyword\",\"keyword\",\"keyword\",\"keyword\",\"keyword\",\"keyword\",\"keyword\",\"keyword\",\"keyword\",\"keyword\",\"keyword\",\"keyword\"],\"title\":[\"Justin Trudeau\",\"crime\",\"middle class\",\"military\",\"oil\",\"scandal\",\"small businesses\",\"syrian refugees\",\"tax cuts\",\"terrorism\",\"youth\",\"debate\",\"deficit\",\"education\",\"first nations\",\"health\",\"holidays\",\"infrastructures\",\"jobs\"],\"x\":[-37.188114166259766,23.77569007873535,-28.611560821533203,4.06574010848999,42.19157791137695,-68.9581527709961,18.78330421447754,1.4275809526443481,27.854501724243164,13.993410110473633,-19.84250259399414,-51.2637939453125,25.1965274810791,39.837520599365234,24.786954879760742,47.842220306396484,75.65483093261719,47.302711486816406,6.081781387329102],\"y\":[-74.02349853515625,-93.00253295898438,19.60369110107422,-52.734352111816406,-34.82148361206055,-1.0933959484100342,20.926881790161133,-68.85981750488281,41.229515075683594,-55.611148834228516,43.068241119384766,-13.512829780578613,62.64414596557617,18.401174545288086,-47.11174774169922,21.64363670349121,-33.373573303222656,-12.435264587402344,28.775665283203125]}},\"id\":\"1a71ec30-adb5-42ba-a8ea-f990177990c2\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"callback\":null,\"column_names\":[\"y\",\"party\",\"_rowName\",\"x\",\"title\"],\"data\":{\"_rowName\":[\"pr109\",\"pr110\",\"pr111\",\"pr112\",\"pr113\",\"pr114\",\"pr115\",\"pr116\",\"pr117\",\"pr118\",\"pr119\",\"pr120\",\"pr121\",\"pr122\",\"pr123\",\"pr124\",\"pr180\",\"pr181\",\"pr182\",\"pr183\",\"pr184\",\"pr185\",\"pr186\",\"pr187\",\"pr188\",\"pr189\",\"pr190\",\"pr191\",\"pr192\",\"pr196\",\"pr198\",\"pr200\",\"pr201\",\"pr202\",\"pr203\",\"pr204\",\"pr205\",\"pr206\",\"pr207\",\"pr208\",\"pr209\",\"pr210\",\"pr211\",\"pr212\",\"pr213\",\"pr214\",\"pr215\",\"pr216\",\"pr217\",\"pr218\",\"pr219\",\"pr220\",\"pr221\",\"pr222\",\"pr223\",\"pr224\",\"pr225\",\"pr226\",\"pr227\",\"pr228\",\"pr229\",\"pr230\",\"pr231\",\"pr232\",\"pr233\",\"pr234\",\"pr235\",\"pr236\",\"pr237\",\"pr238\",\"pr239\",\"pr240\",\"pr241\",\"pr242\",\"pr243\",\"pr244\",\"pr245\",\"pr246\",\"pr247\",\"pr248\",\"pr249\",\"pr250\",\"pr251\",\"pr252\",\"pr253\",\"pr254\",\"pr255\",\"pr256\",\"pr257\"],\"party\":[\"green\",\"green\",\"green\",\"green\",\"green\",\"green\",\"green\",\"green\",\"green\",\"green\",\"green\",\"green\",\"green\",\"green\",\"green\",\"green\",\"green\",\"green\",\"green\",\"green\",\"green\",\"green\",\"green\",\"green\",\"green\",\"green\",\"green\",\"green\",\"green\",\"green\",\"green\",\"green\",\"green\",\"green\",\"green\",\"green\",\"green\",\"green\",\"green\",\"green\",\"green\",\"green\",\"green\",\"green\",\"green\",\"green\",\"green\",\"green\",\"green\",\"green\",\"green\",\"green\",\"green\",\"green\",\"green\",\"green\",\"green\",\"green\",\"green\",\"green\",\"green\",\"green\",\"green\",\"green\",\"green\",\"green\",\"green\",\"green\",\"green\",\"green\",\"green\",\"green\",\"green\",\"green\",\"green\",\"green\",\"green\",\"green\",\"green\",\"green\",\"green\",\"green\",\"green\",\"green\",\"green\",\"green\",\"green\",\"green\",\"green\"],\"title\":[\"Canadians Deprived of National Televised English Language Debate\",\"Green Party will work to restore democracy in the next Parliament\",\"Trans Pacific Partnership a threat to Canada's sovereignty says Green Party\",\"Elizabeth May Stands Up For Canadian Scientists\",\"The Green Party supports Canada's Small Business Owners\",\"Danger of Shooting War in Syria increases\",\"Elizabeth May welcomes NDP commitment to unmuzzle scientists, pledges to work collaboratively in the next minority government\",\"The Green Party is the Only Party with Both Ambitious Targets and a Practical Plan on Climate Change\",\"Greens will Protect Canada's Water\",\"Greens Pledge Support for Canadian Arts and Culture\",\"Green Party congratulates Canadian Scientist Dr. Arthur R. McDonald for Nobel Prize in Physics\",\"The Green Party will Defend Canada's Coasts\",\"Trans-Pacific Partnership Agreement is a Bad Deal for Canada\",\"Elizabeth May Meets Neil Young in Vancouver\",\"Kinder Morgan a Risk to the Economy and the Environment\",\"The Law Is Finally Applied, the Federal Government Must Now Cooperate With Montr\\u00e9al\",\"Universality and the United Nations...a Canadian Time Bomb\",\"Elizabeth May addresses Foreign Policy on Social Media Tonight\",\"Elizabeth May at Union of B.C. Indian Chiefs General Assembly - Announces Green Party Plan for First Nations\",\"Elizabeth May Clear Winner in Maclean's Debate\",\"Greens Ask Mulcair to Step up in all Debates\",\"Mulcair ignores Canadians' demands to include Elizabeth May in Leaders Debates\",\"Green Party Unveils Plan to Support Veterans\",\"Greens Welcome Incumbent MP Jos\\u00e9 N\\u00fa\\u00f1ez-Melo to the Green Party Caucus\",\"Green Party Says No to Risky Pipeline and Tanker Schemes\",\"Greens Challenge other Parties to Run Carbon Neutral Campaigns\",\"Thomas Mulcair Backs Out of Women's Debate\",\"Green Party Announces National Housing Strategy\",\"Appointment of Kinder Morgan Ally to National Energy Board Forces Delay in Hearings\",\"TVA Must Explain Why It Favours the Bloc\",\"Elizabeth May calls for Implementation of Green Party's National Seniors Strategy\",\"Greens want Bloc Invited to the National Televised English Language Debate\",\"Elizabeth May successfully uses social media to outline Green Party's foreign policy plan\",\"Foreign Affairs Briefing Book Backs Up What Elizabeth May Has Been Seeing Internationally\",\"Elizabeth May responds to Liberal plan for Clean Tech Fund; Green Party's National Sustainable Jobs Plan does more\",\"Green Party of Canada and 90,000 Quebecers say No to Tar Sands\",\"Green Party will eliminate poverty through plan for Guaranteed Liveable Income\",\"Conservatives Snub Another UN Meeting\",\"It's time for more care in Medicare: Green Party of Canada promises dental coverage for low-income youth\",\"Greens Pledge to Make Poverty History, At Home and Abroad\",\"Greens Unite Across the Pacific\",\"Selling Off CBC Properties: \\u201cWe will Remove the For Sale Sign in Front of CBC\\u201d\",\"Green Party's Plan for Cities: \\u201cIt's Time To Close the Infrastructure Gap\\u201d\",\"Green Party to Bolster Victoria's Tech Industry\",\"Green Party to Put Vancouver Island Back on Track\",\"Green Party Calls for Investment in Sustainable Energy after B.C. Earthquake\",\"Green surge on Vancouver Island - New Independent Poll\",\"Elizabeth May Calls on Federal Party Leaders to Participate in National Broadcasters' Debate\",\"Elizabeth May Meets with Islanders and Green Candidates \\u2013 Tuesday, September 1\",\"Greens condemn Mohamed Fahmy jail sentence\",\"Green Party Stands up for Canada Post\",\"Harper absent from Obama-led meeting on the threat to the Arctic\",\"Green Party Announces National Seniors Strategy\",\"Green Party Releases Television Ads\",\"Greens Demand we Defend Canada's Sovereignty\",\"Statement by Elizabeth May on the Syrian Refugee Crisis\",\"Greens want leaders to meet on Syrian crisis\",\"Greens Unveil 2015 Platform For a Canada That Works. Together.\",\"Elizabeth May responds to Mulcair's refusal to participate in national televised debates\",\"Green Party Calls on the Government to Use Military Transport to Bring Syrian Refugees to Canada\",\"KPMG Scandal: Greens Would Close Tax Haven Loopholes\",\"Green Party Announces LGBTQ+ Strategy\",\"Greens join UBCIC in calling for Calm: Unist'ot'en in Northeastern B.C. defending their land\",\"Greens partner with Twitter Canada to take part in The Globe and Mail Federal Leaders' Debate\",\"Green Party calls for action on Globe's corporate-controlled debate\",\"Elizabeth May urges the Canadian government to stop transfer of Canadians' private banking information to US\",\"Green Party's Plan will help Students and Seniors\",\"It's Time to get VIA Rail Back on Track\",\"Holding Town Halls Part of Green Party's DNA\",\"Tonight Should Have Been Debate Night: \\u201cWhy did Harper and Mulcair both Say No?\\u201d\",\"Elizabeth May says women's issues are a priority for the Green Party in \\\"Up for Debate\\\" discussion\",\"Ontario Nurses support the Green Party's Drug Plan\",\"Elizabeth May Participates in French-Language Leaders' Debate Tomorrow Night\",\"Green Party supports Vancouver Mayor's call for federal strategy on affordable housing\",\"Green Party Dismayed at CBC's Plan to Sell its Properties\",\"Elizabeth May comments on Clinton's statement on Keystone, stresses Canada has to take climate action now\",\"Elizabeth May brings a strong voice to French-language 2015 Leaders' Debate in Montreal\",\"Elizabeth May adds substance to French-language 2015 Leaders' Debate\",\"Green Party Leader Elizabeth May reacts to NDP Climate Change Announcement\",\"Greens' Pledge to Abolish Tuition Fees, Invest in Youth\",\"Green Party Announces Job Creation Plan\",\"Green Party vows to protect Canadian Parks\",\"Elizabeth May Prepares for The Globe and Mail Federal Leaders' Economy Debate tonight\",\"Elizabeth May interacted with more Canadians than any party leader during the Globe Debate\",\"The Munk Leaders' Debate is Illegal in Both Official Languages\",\"Greenpac Expert Panels endorses Green Candidates\",\"Green Party Plan Saves Canadians Over $11 billion on Prescription Drugs\",\"Women are half the Canadian population, yet not \\\"Up for debate\\\"\",\"Elizabeth May joins the Canadian Medical Association (CMA) in call for improvements to seniors care\"],\"x\":[-50.97550582885742,-37.578556060791016,9.206478118896484,48.64124298095703,38.25344467163086,21.761137008666992,-57.057098388671875,5.4965314865112305,42.043434143066406,-18.86578369140625,49.128292083740234,40.99611282348633,10.634087562561035,-19.63279151916504,38.73387908935547,38.37479019165039,-22.44805908203125,-23.910612106323242,23.777299880981445,-33.04436492919922,-50.6904411315918,-47.964839935302734,-5.70530366897583,-37.2653923034668,39.23604202270508,-20.069211959838867,-44.12815475463867,55.75330352783203,-43.89596176147461,-41.02301025390625,63.22066879272461,-54.781856536865234,-26.396028518676758,-17.85465431213379,25.655391693115234,40.19872283935547,60.23945236206055,-20.527036666870117,61.55916976928711,61.36528778076172,10.318679809570312,-19.88170623779297,55.142242431640625,23.834562301635742,58.68666458129883,37.285247802734375,-37.3194465637207,-50.19815444946289,-36.10729217529297,-97.21232604980469,57.357479095458984,-29.251022338867188,62.776275634765625,-52.49595642089844,11.30150318145752,-5.090860843658447,2.458836078643799,24.735857009887695,-51.19738006591797,-5.229580402374268,-38.87913513183594,-3.989872455596924,34.70305633544922,-24.913799285888672,-10.0994873046875,2.458895444869995,62.7731819152832,59.72128677368164,-39.75424575805664,-51.366065979003906,-41.364112854003906,68.91797637939453,-48.54948806762695,55.269100189208984,-20.323408126831055,-30.791160583496094,-6.852602005004883,-7.9859514236450195,7.1916704177856445,0.15481296181678772,27.149229049682617,43.877777099609375,-25.594615936279297,-54.54214859008789,-68.98529815673828,49.40671157836914,69.92584228515625,-42.56309509277344,64.58981323242188],\"y\":[-28.606149673461914,-36.89787292480469,-42.93772506713867,-24.67536735534668,-36.6578369140625,-55.2515869140625,-32.02346420288086,-32.22738265991211,-27.298337936401367,-16.136676788330078,-23.937255859375,-33.894779205322266,-41.867698669433594,-29.949710845947266,-32.96562194824219,-28.847949981689453,-37.56348419189453,-38.13986587524414,-15.633777618408203,-29.585060119628906,-23.433496475219727,-28.360353469848633,-47.188358306884766,-40.196842193603516,-32.40370559692383,-13.740768432617188,-29.295671463012695,5.8820037841796875,-36.256614685058594,-45.383460998535156,24.318965911865234,-31.96371078491211,-36.49187469482422,-39.27427673339844,4.018438816070557,-31.402896881103516,20.254867553710938,-38.3598518371582,29.66108512878418,19.588897705078125,-43.034645080566406,-16.00997543334961,3.4523367881774902,6.984725475311279,4.342234134674072,-33.52986526489258,-38.26137161254883,-28.80642318725586,-43.65161895751953,-1.7556324005126953,7.876317024230957,-32.299049377441406,24.013086318969727,-33.56505584716797,-44.051666259765625,-53.41112518310547,2.091273307800293,-8.521254539489746,-31.063405990600586,-56.09406661987305,33.86246871948242,-17.163610458374023,-31.221988677978516,-39.41035842895508,-33.070159912109375,2.0913026332855225,26.22248077392578,2.9735865592956543,-33.69586944580078,-26.573516845703125,-32.37730026245117,28.718460083007812,-32.40191650390625,6.616130352020264,-17.572282791137695,-30.862287521362305,-32.64627456665039,-32.7328987121582,-25.508716583251953,16.630409240722656,11.67476749420166,-24.759035110473633,-40.50965118408203,-32.7667236328125,5.939140796661377,-27.256101608276367,28.983661651611328,-31.632436752319336,23.441547393798828]}},\"id\":\"6fa6e961-86af-4672-8a3b-192f51f5280b\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"callback\":null},\"id\":\"43629dac-fb73-4b9b-b5c7-18e3d0470837\",\"type\":\"DataRange1d\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.5},\"fill_color\":{\"value\":\"#01DF01\"},\"line_color\":{\"value\":\"#01DF01\"},\"radius\":{\"units\":\"data\",\"value\":1},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"c90367f8-ce4f-4388-aa3b-f7e874944c85\",\"type\":\"Circle\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.1},\"fill_color\":{\"value\":\"#1f77b4\"},\"line_alpha\":{\"value\":0.1},\"line_color\":{\"value\":\"#1f77b4\"},\"radius\":{\"units\":\"data\",\"value\":1},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"0dcb7938-b4a4-40ce-ad7d-0e0152d6154c\",\"type\":\"Circle\"},{\"attributes\":{\"callback\":null,\"column_names\":[\"y\",\"party\",\"_rowName\",\"x\",\"title\",\"width\"],\"data\":{\"_rowName\":[\"kw0\",\"kw1\",\"kw10\",\"kw11\",\"kw12\",\"kw13\",\"kw14\",\"kw15\",\"kw16\",\"kw17\",\"kw18\",\"kw2\",\"kw3\",\"kw4\",\"kw5\",\"kw6\",\"kw7\",\"kw8\",\"kw9\"],\"party\":[\"keyword\",\"keyword\",\"keyword\",\"keyword\",\"keyword\",\"keyword\",\"keyword\",\"keyword\",\"keyword\",\"keyword\",\"keyword\",\"keyword\",\"keyword\",\"keyword\",\"keyword\",\"keyword\",\"keyword\",\"keyword\",\"keyword\"],\"title\":[\"Justin Trudeau\",\"crime\",\"middle class\",\"military\",\"oil\",\"scandal\",\"small businesses\",\"syrian refugees\",\"tax cuts\",\"terrorism\",\"youth\",\"debate\",\"deficit\",\"education\",\"first nations\",\"health\",\"holidays\",\"infrastructures\",\"jobs\"],\"width\":[36.0,13.5,31.0,21.0,8.5,18.5,41.0,38.5,21.0,23.5,13.5,16.0,18.5,23.5,33.5,16.0,21.0,38.5,11.0],\"x\":[-37.188114166259766,23.77569007873535,-28.611560821533203,4.06574010848999,42.19157791137695,-68.9581527709961,18.78330421447754,1.4275809526443481,27.854501724243164,13.993410110473633,-19.84250259399414,-51.2637939453125,25.1965274810791,39.837520599365234,24.786954879760742,47.842220306396484,75.65483093261719,47.302711486816406,6.081781387329102],\"y\":[-74.02349853515625,-93.00253295898438,19.60369110107422,-52.734352111816406,-34.82148361206055,-1.0933959484100342,20.926881790161133,-68.85981750488281,41.229515075683594,-55.611148834228516,43.068241119384766,-13.512829780578613,62.64414596557617,18.401174545288086,-47.11174774169922,21.64363670349121,-33.373573303222656,-12.435264587402344,28.775665283203125]}},\"id\":\"d34bffb8-af9b-481e-8766-0f76a81de956\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"data_source\":{\"id\":\"4b2abee7-28ca-4089-b4ac-c41bd5b05147\",\"type\":\"ColumnDataSource\"},\"glyph\":{\"id\":\"af5527e4-b608-48be-a5e8-aafaaa975000\",\"type\":\"Circle\"},\"hover_glyph\":null,\"nonselection_glyph\":{\"id\":\"1431dbb8-0391-4d40-977b-f6582d1c2373\",\"type\":\"Circle\"},\"selection_glyph\":null},\"id\":\"30fb04e8-a7e1-4124-b54b-63e33f36e964\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.5},\"fill_color\":{\"value\":\"#0000FF\"},\"line_color\":{\"value\":\"#0000FF\"},\"radius\":{\"units\":\"data\",\"value\":1},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"e3a73776-4f45-433b-b8ea-f8fbaf579239\",\"type\":\"Circle\"},{\"attributes\":{\"data_source\":{\"id\":\"9515508b-7eaa-40e6-b04f-d294af592e28\",\"type\":\"ColumnDataSource\"},\"glyph\":{\"id\":\"e3a73776-4f45-433b-b8ea-f8fbaf579239\",\"type\":\"Circle\"},\"hover_glyph\":null,\"nonselection_glyph\":{\"id\":\"515ec358-bb3f-464a-ac82-765d8b3cb163\",\"type\":\"Circle\"},\"selection_glyph\":null},\"id\":\"d313cde6-26a4-42c7-807b-0443c568522e\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.1},\"fill_color\":{\"value\":\"#1f77b4\"},\"line_alpha\":{\"value\":0.1},\"line_color\":{\"value\":\"#1f77b4\"},\"radius\":{\"units\":\"data\",\"value\":1},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1431dbb8-0391-4d40-977b-f6582d1c2373\",\"type\":\"Circle\"},{\"attributes\":{\"callback\":null,\"column_names\":[\"y\",\"party\",\"_rowName\",\"x\",\"title\"],\"data\":{\"_rowName\":[\"pr271\",\"pr272\",\"pr273\",\"pr274\",\"pr275\",\"pr276\",\"pr277\",\"pr278\",\"pr279\",\"pr280\",\"pr281\",\"pr282\",\"pr283\",\"pr284\",\"pr285\",\"pr286\",\"pr287\",\"pr288\",\"pr289\",\"pr290\",\"pr291\",\"pr292\",\"pr293\",\"pr294\",\"pr295\",\"pr296\",\"pr297\",\"pr298\",\"pr299\",\"pr300\",\"pr301\",\"pr302\",\"pr303\",\"pr304\",\"pr305\",\"pr306\",\"pr307\",\"pr308\",\"pr309\",\"pr310\",\"pr311\",\"pr312\",\"pr313\",\"pr314\",\"pr315\",\"pr316\",\"pr317\",\"pr318\",\"pr319\",\"pr320\",\"pr321\",\"pr322\",\"pr323\",\"pr324\",\"pr325\",\"pr327\",\"pr328\",\"pr329\",\"pr330\",\"pr331\",\"pr332\",\"pr333\",\"pr334\",\"pr336\",\"pr337\",\"pr396\",\"pr398\",\"pr399\",\"pr400\",\"pr401\",\"pr402\",\"pr403\",\"pr405\",\"pr406\",\"pr407\",\"pr408\",\"pr409\",\"pr410\",\"pr411\",\"pr412\",\"pr413\",\"pr414\",\"pr415\",\"pr416\",\"pr417\",\"pr418\",\"pr419\",\"pr420\",\"pr421\",\"pr422\",\"pr423\",\"pr424\",\"pr425\",\"pr426\",\"pr427\",\"pr428\",\"pr429\",\"pr430\",\"pr432\",\"pr433\",\"pr434\",\"pr437\",\"pr448\",\"pr449\",\"pr450\",\"pr451\",\"pr452\",\"pr453\",\"pr454\",\"pr455\",\"pr457\",\"pr549\",\"pr550\",\"pr551\",\"pr552\",\"pr553\",\"pr554\",\"pr555\",\"pr556\",\"pr558\",\"pr595\",\"pr596\",\"pr597\",\"pr599\",\"pr600\",\"pr601\",\"pr602\",\"pr603\",\"pr604\",\"pr605\",\"pr606\",\"pr607\",\"pr608\",\"pr609\",\"pr610\",\"pr611\",\"pr612\",\"pr613\",\"pr614\",\"pr615\",\"pr616\",\"pr617\",\"pr618\",\"pr619\",\"pr620\",\"pr621\",\"pr622\",\"pr623\",\"pr624\",\"pr625\",\"pr626\",\"pr627\",\"pr628\",\"pr629\",\"pr630\",\"pr682\"],\"party\":[\"ndp\",\"ndp\",\"ndp\",\"ndp\",\"ndp\",\"ndp\",\"ndp\",\"ndp\",\"ndp\",\"ndp\",\"ndp\",\"ndp\",\"ndp\",\"ndp\",\"ndp\",\"ndp\",\"ndp\",\"ndp\",\"ndp\",\"ndp\",\"ndp\",\"ndp\",\"ndp\",\"ndp\",\"ndp\",\"ndp\",\"ndp\",\"ndp\",\"ndp\",\"ndp\",\"ndp\",\"ndp\",\"ndp\",\"ndp\",\"ndp\",\"ndp\",\"ndp\",\"ndp\",\"ndp\",\"ndp\",\"ndp\",\"ndp\",\"ndp\",\"ndp\",\"ndp\",\"ndp\",\"ndp\",\"ndp\",\"ndp\",\"ndp\",\"ndp\",\"ndp\",\"ndp\",\"ndp\",\"ndp\",\"ndp\",\"ndp\",\"ndp\",\"ndp\",\"ndp\",\"ndp\",\"ndp\",\"ndp\",\"ndp\",\"ndp\",\"ndp\",\"ndp\",\"ndp\",\"ndp\",\"ndp\",\"ndp\",\"ndp\",\"ndp\",\"ndp\",\"ndp\",\"ndp\",\"ndp\",\"ndp\",\"ndp\",\"ndp\",\"ndp\",\"ndp\",\"ndp\",\"ndp\",\"ndp\",\"ndp\",\"ndp\",\"ndp\",\"ndp\",\"ndp\",\"ndp\",\"ndp\",\"ndp\",\"ndp\",\"ndp\",\"ndp\",\"ndp\",\"ndp\",\"ndp\",\"ndp\",\"ndp\",\"ndp\",\"ndp\",\"ndp\",\"ndp\",\"ndp\",\"ndp\",\"ndp\",\"ndp\",\"ndp\",\"ndp\",\"ndp\",\"ndp\",\"ndp\",\"ndp\",\"ndp\",\"ndp\",\"ndp\",\"ndp\",\"ndp\",\"ndp\",\"ndp\",\"ndp\",\"ndp\",\"ndp\",\"ndp\",\"ndp\",\"ndp\",\"ndp\",\"ndp\",\"ndp\",\"ndp\",\"ndp\",\"ndp\",\"ndp\",\"ndp\",\"ndp\",\"ndp\",\"ndp\",\"ndp\",\"ndp\",\"ndp\",\"ndp\",\"ndp\",\"ndp\",\"ndp\",\"ndp\",\"ndp\",\"ndp\",\"ndp\",\"ndp\",\"ndp\",\"ndp\",\"ndp\",\"ndp\",\"ndp\"],\"title\":[\"Time to end Harper's lost decade\",\"Mulcair pledges support for wine tourism in the Okanagan\",\"Summary of Tom Mulcair's call with Egyptian ambassador on Mohamed Fahmy's case\",\"Liberals oppose plan to combat violence against women\",\"Mulcair to invest in sports for disadvantaged youth\",\"Nash: Trudeau still foggy on what he'll cut\",\"NDP government will begin new era of respect, action and bridging the gap \",\"Harper failure on Ring of Fire costing Northern Ontario jobs\",\"Mulcair announces plan for stronger pensions and retirement security\",\"NDP lays out concrete plan on refugee crisis\",\"Harper's failed plan on the economy costing Canadians\",\"Tom Mulcair the official NDP candidate in Outremont\",\"NDP lays out next steps to help Syrian refugees\",\"Statement by NDP leader Tom Mulcair on Labour Day\",\"NDP leader announces national aerospace plan\",\"Statement by NDP leader Tom Mulcair on Quebec's commitment to help Syrian refugees\",\"NDP statement in response to Status of Women Canada report\",\"Mulcair announces auto-sector jobs strategy\",\"NDP REALITY CHECK: Liberals cut benefits and raided $50 billion from the EI fund \\u2013 and Justin Trudeau says this was the right decision\",\"NDP welcomes First Nation-led  Who Is She?  campaign\",\"Trudeau must apologize for smear on small business owners\",\"Tom Mulcair calls for donation matching program for Syria relief efforts\",\"NDP REALITY CHECK: Trudeau Liberals prefer scoring political points than helping parents with affordable, quality childcare \",\"Mulcair to create opportunities for 40,000 youth\",\"Hollett: we can't afford the Liberals' lost decades on childcare\",\"NDP REALITY CHECK: Liberal Candidate in B.C. disagrees with Trudeau's unprincipled position on C-51\",\"Statement by NDP leader Tom Mulcair on the anniversary of September 11\",\"Mulcair announces infrastructure plan for jobs and growth\",\"Questions remain for Trudeau regarding small business\",\"NDP REALITY CHECK: First page in the Conservatives' \\u2018Wizard of Oz' Play Book: Play wedge politics with refugees and immigration\",\"Attorney General must ask public prosecutor to investigate PMO staff at Duffy trial\",\"NDP statement regarding the Syrian refugee crisis\",\"Statement by NDP leader Tom Mulcair on Rosh Hashanah\",\"Mulcair to expand home care to support 41,000 more seniors \",\"NGO new study confirms NDP infrastructure plan will create jobs, strengthen economy\",\"Bad ideas from Trudeau's  excellent  economic team: vol.1\",\"Mulcair to help five million Canadians access family doctors\",\"NDP REALITY CHECK: Stephen Harper's appointments end up in scandals, or on trial \\u2013 but is Justin Trudeau's judgment any better?\",\"NDP REALITY CHECK: Conservatives on trial: The Bruce Carson Influence Peddling and Fraud Edition\",\"NDP REALITY CHECK: Bruce Carson, lobbying and senior Liberal and Conservative Operatives \",\"NDP REALITY CHECK: Justin Trudeau is wrong about opponents of bill C-51\",\"Mulcair to launch national Alzheimer's and dementia strategy\",\"Mulcair to improve mental health care for young Canadians\",\"Bad ideas from Trudeau's  excellent  economic team: vol.2  infrastructure edition\",\"NDP REALITY CHECK: Justin Trudeau and prominent Liberals endorse NDP corporate tax plan\",\"Mulcair to improve mental health care for young Canadians\",\"NDP releases balanced fiscal plan\",\"Open letter to Mr. Trudeau: Release Your Costing\",\"NDP REALITY CHECK: Stephen Harper's real economic record\",\"Justin Trudeau's maxed out his credit card.\",\"NDP REALITY CHECK: Liberals and Conservatives side with Jack Mintz \\u2013 NDP sides with middle class families\",\"Harper's infrastructure plan stuck in neutral; Mulcair would put Canada in the fast lane\",\"Tom Mulcair outshines opponents on jobs plan\",\"Justin Trudeau has #noplan for jobs\",\"Justin Trudeau has #noplan on infrastructure\",\"Justin Trudeau has #noplan on housing\",\"Tom Mulcair champions NDP plan for strong energy sector and a clean environment\",\"Justin Trudeau has #noplan on immigration\",\"NDP REALITY CHECK: Stephen Harper wrong on Canada's Jobs Record\",\"NDP's stable, predictable infrastructure plan is the change communities need\",\"NDP REALITY CHECK: Mulcair's jobs plan focused on today and long term\",\"NDP's plan will fix Canada's broken immigration system\",\"NDP's modest corporate tax increase lower than average rate under Liberals and Conservatives\",\"NDP will bring federal leadership back to affordable housing\",\"Tom Mulcair will invest in the middle class by asking corporations to pay their fair share\",\"Tom Mulcair wins leaders' debate on the economy\",\"Canadians to pay less for prescription drugs with Tom Mulcair\",\"What they're saying about Tom Mulcair's performance at the Leaders' Debate\",\"What they're saying about the NDP's universal prescription drug plan\",\"NDP statement regarding the Syrian refugee crisis\",\"Has Justin Trudeau put out a fiscal plan\\u2014or not?\",\"Veterans to get services and respect they deserve with Mulcair\",\"Young, precarious workers better insured with Tom Mulcair\",\"Statement by NDP leader Tom Mulcair on Yom Kippur\",\"NDP calls for Ethics Commissioner investigation\",\"Statement from NDP candidate Paul Dewar on release of Mohamed Fahmy\",\"Why won't Justin Trudeau support childcare?\",\"Hillary clinton rejects Trudeau and Harper's Keystone pipeline\",\"CBC/Radio-Canada asset sale should be halted: NDP\",\"Statement by NDP leader Tom Mulcair for Eid-al-Adha\",\"Trudeau vs. Trudeau\",\"Ontario corruption charges hit close to home for Justin Trudeau\",\"Tom Mulcair wins the French debate\",\"Canadian forestry jobs poised for growth with Mulcair\",\"What they're saying about Tom Mulcair's performance at the leaders' debate\",\"Liberals' real immigration record \\u2013 lots of rhetoric but no action\",\"Statement by Tom Mulcair for Franco-Ontarian day\",\"NDP REALITY CHECK: Tories have already broken own  tax lock  law\\u2014and know it won't stand\",\"Trudeau has maxed out his $10b credit card, so what will he cut?\",\"Trudeau's overspending on $10b deficit plan means \\u2018promises' can't be kept\",\"Canada to show leadership on climate change with Tom Mulcair\",\"Davies:  Trudeau must denounce star candidate's damaging comments re: G7\",\"NDP REALITY CHECK: Stephen Harper's Changing Story on the Iraq Combat Mission\",\"NDP REALITY CHECK: Six Liberal flip flops on the mission in Iraq\",\"NDP REALITY CHECK: Justin Trudeau didn't stand up when it counted\",\"Tom Mulcair ready to improve Canada's international reputation\",\"NDP REALITY CHECK: What Stephen Harper isn't telling you \\u2013 he used bill C-51 to play wedge politics, not to keep Canada safe\",\"NDP REALITY CHECK:  On Russia Harper is All Talk and No Action\",\"Mulcair to restore Canadian leadership on foreign aid\",\"NDP REALITY CHECK: When it comes to international trade, Harper can't seal the deal\",\"NDP REALITY CHECK: Trudeau's climate talk not backed up with action\",\"NDP REALITY CHECK: Stephen Harper misleads on climate change\",\"Tom Mulcair wins Munk debate\",\"Tom Mulcair ready to take on climate crisis\",\"NDP REALITY CHECK: Trudeau slashes First Nations education funding\",\"What they're saying about Tom Mulcair's performance at the Munk Debate\",\"NDP release plan for supporting Canadians with disabilities\",\"Trudeau's $1.7 billion broken promise to First Nations children\",\"Improving access to healthy food in northern communities\",\"NDP statement on supply management\",\"Respect for science at the core of Mulcair climate agenda\",\"NDP REALITY CHECK: Liberals putting their trust in Tom Mulcair to bring change to Ottawa\",\"NDP leader Tom Mulcair brings his Campaign for Change to Toronto\",\"NDP REALITY CHECK: LIBERALS DON'T THINK ANY WORKERS MAKING MINIMUM WAGE DESERVE A RAISE\",\"NDP Reality Check: Stephen Harper's real record on democratic reform\",\"NDP REALITY CHECK: STEPHEN HARPER'S REAL ECONOMIC RECORD\",\"TOM MULCAIR WINS LEADERS' DEBATE\",\"NDP LEADER TOM MULCAIR BRINGS HIS CAMPAIGN FOR CHANGE TO VANCOUVER\",\"WHAT THEY'RE SAYING ABOUT TOM MULCAIR'S PERFORMANCE AT THE LEADERS' DEBATE\",\"NDP REALITY CHECK: After breaking all his previous promises, Stephen Harper makes new promises on refugees\",\"Mulcair tells his personal and political story in new book\",\"NDP leader Tom Mulcair brings his Campaign for Change to Mascouche\",\"NDP REALITY CHECK: As Duffy trial resumes \\u2026 Stephen Harper is running away as fast as he can go.\",\"NDP REALITY CHECK: Conservatives' Freedom Road duplicity exposed\",\"NDP leader Tom Mulcair brings his Campaign for Change to Danville\",\"NDP REALITY CHECK: Harper can't be trusted on the economy, or to run an ethical government \",\"NDP LEADER TOM MULCAIR BRINGS HIS CAMPAIGN FOR CHANGE TO L\\u00c9VIS\",\"NDP OUTLINES PLAN TO CLEAN UP SENATE CORRUPTION\",\"Memo to Justin Trudeau: Nothing principled about Liberal support of C-51\",\"NDP leader Tom Mulcair brings his campaign for change to Quebec City\",\"NDP REALITY CHECK: A DESPERATE JUSTIN TRUDEAU ATTACKS TOM MULCAIR PLAN FOR CHANGE\",\"Mulcair to enshrine budget transparency in law\",\"NDP REALITY CHECK: Harper is also on trial \\u2013 and a jury 33 million strong is watching\",\"Statement by the NDP on National Acadian Day\",\"Mulcair announces plan to boost Canadian tourism\",\"Mulcair announces federal action on wildfires and flood safety\",\"NDP writes RCMP on role of Wright, PMO staff in Duffy scandal\",\"Statement by the NDP on the anniversary of the Dieppe Raid\",\"Mulcair announces plan for more front-line police officers\",\"Mulcair plan to create and maintain 110,000 childcare spaces in BC\",\"Statement by the NDP on Black Ribbon Day (Commemoration of the victims of Communism and Nazism)\",\"Mulcair announces plan to lift 200,000 seniors out of poverty\",\"Statement by the NDP on Ukraine's Independence Day\",\"Mulcair slams Harper over manufacturing job losses\",\"NDP statement on the Up for Debate proposal to discuss women's issues\",\"Justin Trudeau isn't up to the job\",\"Mulcair to strengthen manufacturing with new Innovation Tax Credit\",\"Thomson: Justin Trudeau's inconsistency on the economy shows he's not up to the job\",\"Mulcair brings his Campaign for Change to Eglinton-Lawrence\",\"Reality check: on balancing the budget, Justin Trudeau doesn't know where he stands\",\"51 days to repeal C-51\",\"Mulcair brings NDP Campaign for Change to Facebook\",\"NDP calls on Stephen Harper to secure release of Mohamed Fahmy\",\"Mulcair brings his Campaign for Change to Halifax\",\"Canadians want change, Conservatives and Liberals desperately want to change the channel\",\"Infrastructures : Justin Trudeau n'a pas de plan\"],\"x\":[29.511608123779297,41.277618408203125,-93.97471618652344,41.70587158203125,-18.960731506347656,2.4587671756744385,-21.60361671447754,31.762052536010742,-24.173742294311523,-5.521793842315674,30.57240104675293,-15.395424842834473,-5.853105068206787,-23.707826614379883,22.312061309814453,-3.6873950958251953,59.351226806640625,37.91539001464844,22.188243865966797,41.30718231201172,-37.34571075439453,-8.876168251037598,-19.773780822753906,-7.037017822265625,-26.434782028198242,-51.197147369384766,39.79502868652344,55.33218002319336,-38.62910461425781,-45.26180648803711,-83.07723236083984,-7.015243053436279,74.04564666748047,54.14000701904297,-10.203886032104492,20.780609130859375,53.435096740722656,-76.96077728271484,-76.48676300048828,-77.0440444946289,-8.148548126220703,57.20469284057617,58.55100631713867,11.788515090942383,26.10582733154297,58.1806640625,22.682422637939453,51.89629364013672,-7.988892078399658,23.795360565185547,8.289398193359375,-10.20505142211914,-4.8166327476501465,-60.31682205200195,-61.96782684326172,-61.21712112426758,12.074798583984375,-61.17582321166992,43.60494613647461,56.940948486328125,-3.3285915851593018,-17.916284561157227,9.53587818145752,59.924678802490234,9.208806991577148,-4.981327056884766,71.05062866210938,-49.5742301940918,63.149147033691406,-6.502068042755127,20.240333557128906,51.93159103393555,-11.98221206665039,74.49540710449219,-77.09722900390625,-98.3904037475586,2.4588735103607178,-52.61867141723633,-20.410743713378906,70.53221893310547,-48.61697769165039,-50.58360290527344,-37.494239807128906,27.17263412475586,-47.73517608642578,-59.36091232299805,7.414973258972168,18.207983016967773,22.83853530883789,19.218528747558594,9.937043190002441,-51.60613250732422,-43.354103088378906,-33.86408615112305,-51.3832893371582,-20.118160247802734,-44.84822463989258,-22.228883743286133,24.53106689453125,-20.404712677001953,3.9221768379211426,8.554656028747559,-43.011531829833984,8.220864295959473,8.465547561645508,-47.38606262207031,2.4588959217071533,14.708232879638672,57.84051513671875,-25.510183334350586,26.058629989624023,-36.58274841308594,-13.78809928894043,-33.821189880371094,-52.15531921386719,21.792165756225586,-40.82200622558594,-14.062460899353027,-47.51348114013672,-29.2475643157959,-43.48115921020508,17.70401954650879,-69.8217544555664,-33.447044372558594,34.90279006958008,34.8489990234375,-70.74412536621094,-63.56926345825195,-52.35995864868164,-12.43802547454834,10.604142189025879,34.39534378051758,-78.9119873046875,2.408050060272217,42.43046188354492,24.118633270263672,-79.74031829833984,31.15717887878418,21.46334457397461,-29.588218688964844,29.437711715698242,-15.842206001281738,19.372833251953125,17.999774932861328,-52.10233688354492,21.96668243408203,19.484865188598633,24.853147506713867,34.496795654296875,24.864093780517578,-50.48939895629883,-32.84627914428711,-96.59410858154297,-13.912906646728516,33.44717788696289,-33.16200256347656],\"y\":[54.06003952026367,-7.479978084564209,-2.3958370685577393,-54.96479415893555,41.94009780883789,2.091303825378418,-35.59024429321289,-6.977172374725342,37.74635314941406,-59.8018798828125,54.01628494262695,14.051271438598633,-60.76224136352539,34.98564910888672,7.167908668518066,-62.25520706176758,22.16532325744629,-1.2639471292495728,45.46834182739258,-54.268531799316406,33.250614166259766,-61.65803527832031,38.316444396972656,15.671891212463379,42.56734085083008,-2.4175591468811035,-69.19407653808594,-7.41546106338501,-10.494850158691406,-53.52000427246094,-8.749982833862305,-61.594058990478516,-33.600032806396484,33.806949615478516,23.034534454345703,55.860347747802734,33.929298400878906,-0.8063517808914185,1.8298418521881104,-4.645668029785156,-21.222705841064453,34.279537200927734,32.63404083251953,56.40734100341797,59.16600799560547,32.372352600097656,55.36565399169922,35.962337493896484,32.81695556640625,56.0926513671875,42.337318420410156,24.71903419494629,30.28106117248535,39.933197021484375,41.71526336669922,41.41672897338867,-25.08160400390625,42.66328811645508,71.07176971435547,-7.068036079406738,29.640872955322266,52.00122833251953,41.630619049072266,17.042661666870117,38.9033203125,32.65423583984375,29.301210403442383,-54.83023452758789,28.79659652709961,-62.80345153808594,50.54997253417969,32.0609130859375,38.1514892578125,-36.12297439575195,0.1702897697687149,0.6564354300498962,2.091374635696411,-53.58653259277344,-19.185131072998047,-31.191730499267578,-21.03415870666504,-44.75934600830078,10.106350898742676,7.707870006561279,-54.44317626953125,38.316490173339844,-2.1497228145599365,69.73094177246094,53.344120025634766,64.67794799804688,-25.030906677246094,-51.32807922363281,2.4868974685668945,-31.337900161743164,-56.20408248901367,-49.25895690917969,-0.3176043629646301,-50.25861358642578,-6.777686595916748,-47.78092956542969,-29.058216094970703,-23.4785213470459,0.8332443833351135,-26.657060623168945,81.52972412109375,-55.82804489135742,2.0914647579193115,73.170166015625,19.655723571777344,-27.398603439331055,-10.294363021850586,-42.119964599609375,10.373591423034668,34.56700897216797,-0.6381808519363403,74.61543273925781,0.17302067577838898,11.931532859802246,-52.706607818603516,-19.84320831298828,14.56332015991211,22.051021575927734,0.10183894634246826,-19.92845344543457,11.110132217407227,30.2835693359375,1.6186823844909668,6.855607986450195,-3.721914529800415,14.361770629882812,39.757568359375,27.779050827026367,-5.3254241943359375,-3.217909574508667,-6.785905838012695,-13.090957641601562,-0.1782911866903305,-67.60210418701172,-13.1592435836792,36.4514274597168,-64.12252807617188,16.0383358001709,-63.241947174072266,10.325332641601562,-20.97885513305664,72.88851165771484,9.733978271484375,65.38850402832031,28.38347816467285,58.469730377197266,-2.4900848865509033,22.190406799316406,-1.0429342985153198,13.038498878479004,66.23429870605469,-74.57027435302734]}},\"id\":\"a80c7c44-aeba-423a-90dd-3ca378458154\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"callback\":null,\"plot\":{\"id\":\"95ac976e-5f7f-442d-a348-f8f15f5e1951\",\"subtype\":\"Figure\",\"type\":\"Plot\"},\"tooltips\":[[\"title\",\"@title\"]]},\"id\":\"fbf0d91f-02ee-4097-8c2e-73d77434524b\",\"type\":\"HoverTool\"},{\"attributes\":{\"callback\":null,\"column_names\":[\"y\",\"party\",\"_rowName\",\"x\",\"title\"],\"data\":{\"_rowName\":[\"pr10\",\"pr100\",\"pr101\",\"pr102\",\"pr103\",\"pr104\",\"pr105\",\"pr106\",\"pr107\",\"pr108\",\"pr11\",\"pr12\",\"pr13\",\"pr14\",\"pr15\",\"pr16\",\"pr17\",\"pr18\",\"pr19\",\"pr2\",\"pr20\",\"pr21\",\"pr22\",\"pr23\",\"pr24\",\"pr25\",\"pr26\",\"pr27\",\"pr28\",\"pr29\",\"pr3\",\"pr36\",\"pr37\",\"pr38\",\"pr39\",\"pr4\",\"pr40\",\"pr41\",\"pr42\",\"pr43\",\"pr44\",\"pr45\",\"pr46\",\"pr47\",\"pr48\",\"pr49\",\"pr5\",\"pr50\",\"pr51\",\"pr52\",\"pr53\",\"pr54\",\"pr55\",\"pr56\",\"pr57\",\"pr58\",\"pr59\",\"pr6\",\"pr60\",\"pr61\",\"pr62\",\"pr63\",\"pr64\",\"pr65\",\"pr66\",\"pr67\",\"pr68\",\"pr69\",\"pr7\",\"pr70\",\"pr71\",\"pr72\",\"pr73\",\"pr74\",\"pr75\",\"pr76\",\"pr77\",\"pr78\",\"pr79\",\"pr8\",\"pr80\",\"pr81\",\"pr82\",\"pr83\",\"pr84\",\"pr85\",\"pr86\",\"pr87\",\"pr88\",\"pr89\",\"pr9\",\"pr90\",\"pr91\",\"pr92\",\"pr93\",\"pr94\",\"pr95\",\"pr96\",\"pr97\",\"pr98\",\"pr99\"],\"party\":[\"conservative\",\"conservative\",\"conservative\",\"conservative\",\"conservative\",\"conservative\",\"conservative\",\"conservative\",\"conservative\",\"conservative\",\"conservative\",\"conservative\",\"conservative\",\"conservative\",\"conservative\",\"conservative\",\"conservative\",\"conservative\",\"conservative\",\"conservative\",\"conservative\",\"conservative\",\"conservative\",\"conservative\",\"conservative\",\"conservative\",\"conservative\",\"conservative\",\"conservative\",\"conservative\",\"conservative\",\"conservative\",\"conservative\",\"conservative\",\"conservative\",\"conservative\",\"conservative\",\"conservative\",\"conservative\",\"conservative\",\"conservative\",\"conservative\",\"conservative\",\"conservative\",\"conservative\",\"conservative\",\"conservative\",\"conservative\",\"conservative\",\"conservative\",\"conservative\",\"conservative\",\"conservative\",\"conservative\",\"conservative\",\"conservative\",\"conservative\",\"conservative\",\"conservative\",\"conservative\",\"conservative\",\"conservative\",\"conservative\",\"conservative\",\"conservative\",\"conservative\",\"conservative\",\"conservative\",\"conservative\",\"conservative\",\"conservative\",\"conservative\",\"conservative\",\"conservative\",\"conservative\",\"conservative\",\"conservative\",\"conservative\",\"conservative\",\"conservative\",\"conservative\",\"conservative\",\"conservative\",\"conservative\",\"conservative\",\"conservative\",\"conservative\",\"conservative\",\"conservative\",\"conservative\",\"conservative\",\"conservative\",\"conservative\",\"conservative\",\"conservative\",\"conservative\",\"conservative\",\"conservative\",\"conservative\",\"conservative\",\"conservative\"],\"title\":[\"Conservatives Target World's Human Rights Abusers by Improving Canada's Sanctions Regime\",\"Hold On To Your Wallet: Justin Trudeau's Real Plan For Canada's Middle Class\",\"Statement by the Prime Minister of Canada to celebrate the Mid-Autumn Festival\",\"Statement by Stephen Harper to mark the start of Sukkot\",\"Harper Announces Further Actions To Combat Human Trafficking\",\"Conservatives denounce Liberal plan to weaken crime laws; raise taxes and run permanent deficits\",\"Hon. James Moore And Dianne Watts Announce Commitment To Get Surrey Moving\",\"Harper Aims To Add More Than 700,000 New Canadian Homeowners By 2020\",\"Statement by the Prime Minister\",\"Oliver Highlights Conservative Plan To Cut Payroll Taxes\",\"A Re-Elected Conservative Government Will Fight Fraud Against Seniors And All Canadians With Increased Funding And Mandatory Minimum Penalties\",\"Statement By The Prime Minister\",\"Prime Minister Stephen Harper's Open Letter to the Public Service\",\"National Capital Region Candidates release Prime Minister Stephen Harper's Open Letter to the Public Service\",\"A Re-Elected Conservative Government Will Target Criminal Organizations And Increase Funding For Youth Gang Prevention\",\"STATEMENT: Harper Extends Best Wishes On The 68th Anniversary Of India's Independence\",\"Harper Announces Banned Travel Zones to Combat Terrorism\",\"Harper Highlights the Universal Child Care Benefit\",\"Harper Announces Support for Religious Freedom\",\"Statement by Stephen Harper to mark Yom Kippur, the Jewish Day of Atonement\",\"Statement by the Prime Minister\",\"Harper Announces Long-Term Support For The Canadian Partnership Against Cancer\",\"Harper Announces Long-Term Support For The Canadian Partnership Against Cancer\",\"$8 Billion Hole In Reckless NDP Spending Plans\",\"PM Harper's Low-Tax, Balanced Budget Plan Provides Benefits To All Canadian Families\",\"Prime Minister Harper Announces Support For Manufacturing Jobs In Canada\",\"Harper Announces Support For Resource Development Through An Extended And Enhanced Mining Tax Credit\",\"Harper Announces Plan To Establish A Canadian Armed Forces Reserve Unit In Yukon\",\"Prime Minister Harper Announces Measures To Support Conservation And Canada's Outdoor Community\",\"Harper Announces Funding To Support Local Museums\",\"Harper Sets Target Of 1.3 Million New Jobs By 2020\",\"Vote Harper to stop a  Netflix Tax  #nonetflixtax\",\"Prime Minister Harper Demonstrates Proven Leadership\",\"PM Harper Announces Plan To Strengthen The National Anti-Drug Strategy\",\"Conservative Party of Canada accepts second French language debate\",\"Harper Conservatives to issue new Canadian Veterans Card to all military veterans\",\"Harper highlights support for savings and retirement security\",\"Harper Announces Improvements to Highway 5 in the Northwest Territories\",\"Prime Minister Harper Announces Help For Aspiring Homeowners\",\"STATEMENT: Harper Extends Best Wishes On The 68th Anniversary Of Pakistan's Independence\",\"Harper Announces Expansion of Junior Canadian Rangers\",\"STATEMENT: Harper Extends Best Wishes On The 70th Anniversary Of South Korea's Independence\",\"Harper Conservatives To Improve Benefit For Military Veterans\",\"Prime Minister Harper Highlights Conservative Plan For Affordable Home Ownership\",\"Statement by Stephen Harper on the 73rd anniversary of the Battle of Dieppe\",\"Harper announces expansion of Canadian Armed Forces Reserves\",\"Harper Will Re-Establish College militaire de St. Jean\",\"Harper Announces  Life Means Life  As His Government's Top Justice Priority\",\"Prime Minister Harper Announces Tax Relief for Adoptive Families\",\"Stephen Harper announces plan to save Canadian small business owners' time and money\",\"Harper Announces Additional Measures to Protect BC's Natural Environment\",\"The Hon. Stockwell Day And Blair Lockhart Announce Action To Prevent Impaired Driving\",\"The Hon. Chris Alexander and the Hon. Kellie Leitch Announce Measures to Stop Barbaric Cultural Practices Against Women and Girls\",\"Statement By The Honourable Peter MacKay On The Death Of The Honourable Stewart McInnes\",\"Conservatives Announce New Measures To Support Coastal And Marine Safety In British Columbia\",\"Harper announces renewed funding for ground-breaking neurological research\",\"Harper Announces Successful Conclusion Of Trans-Pacific Partnership Negotiations\",\"Statement By Stephen Harper To Mark Eid Al-Adha\",\"Harper Announces New Support For Canadian Seniors\",\"Prime Minister Harper Announces Plan To Support Auto Jobs In Canada\",\"NDP's plan will kill at least 250,000 jobs\",\"Harper Announces New Measures To Protect Children And Increase Penalties For Serious Crimes\",\"Justin to repeal the Balanced Budget Act so he can plunge Canada into permanent $30-plus billion deficits\",\"Stephen Harper pays tribute to Canadian hero Terry Fox and marks the 35th annual Terry Fox Run\",\"Harper Announces  Maple Leaf  Designation For Canadians Who Build Global Links Benefitting Canada\",\"Prime Minister Harper Announces New Support For Manufacturing\",\"Harper Commits To New Funding To Continue Terry Fox's Fight Against Cancer.\",\"Harper Announces Further Support For People With Disabilities\",\"Harper Government Will Establish Diefenbaker Birthplace As A National Historic Site\",\"Statement By Stephen Harper On The 75th Anniversary Of The Battle Of Britain\",\"Prime Minister Harper Announces Further Support For Families Saving For Their Children's Education\",\"Prime Minister Stephen Harper Announces Payroll Tax Cut For Canadian Workers And Businesses\",\"Harper Announces New Commitments To Lobster Industry\",\"Statement by Prime Minister Stephen Harper to mark Rosh Hashanah\",\"Statement by Stephen Harper on the anniversary of 9/11 and Canada's National Day of Service\",\"Harper Renews Support For Kanishka Project On 14th Anniversary Of 9/11\",\"Harper Sets Out Plan To Lower Taxes On Job-Creating Small Businesses\",\"Statement By Stephen Harper To Mark The Feast Of Nayrouz, Or Coptic New Year\",\"Harper Outlines Balanced Budget, Low-Tax Plan To Protect Canada's Economy\",\"Hon. Jason Kenney Announces Measures To Strengthen Canada's Special Forces\",\"Statement by the Prime Minister of Canada\",\"Harper Announces Tax Relief for Service Club Members\",\"Statement by Prime Minister Stephen Harper on Black Ribbon Day\",\"Stephen Harper extends best wishes on the 24th anniversary of Ukraine's independence\",\"Statement by the Prime Minister of Canada\",\"Harper Outlines Key Parts Of His Economic Action Plan\",\"Harper Promises Broadband Expansion Into More Rural Communities\",\"Harper Announces the  Quebec Maritime Prosperity  Initiative to Foster Job Creation and Support Quebec's Maritime Strategy\",\"Conservatives Announce New Maternity And Parental Leave Benefits\",\"Harper Releases Low-Tax, Balanced-Budget Plan To Protect Canada's Economy\",\"Prime Minister Harper Announces New  Tax Lock  Law\",\"Prime Minister Harper Announces Better Foreign Credential Recognition\",\"Joe Oliver: Liberal Payroll Tax Will Cost Canadians\",\"Statement by Prime Minister Stephen Harper on the 24th anniversary of re-establishing ties with Baltic States\",\"Harper Outlines Low-Tax, Balanced-Budget Plan To Protect Benefits For Families And Seniors\",\"Stephen Harper Extends Best Wishes To Canadians On Thanksgiving\",\"Hold On To Your Wallet: Justin Trudeau's Real Plan For Canada's Middle Class\",\"Hold On To Your Wallet And Your Job: Justin Trudeau's Real Plan For Canada's Small Businesses\",\"Hold On To Your Wallet: Justin Trudeau's Real Plan For Canada's Seniors\",\"Statement by the Hon. Jason Kenney condemning attacks across Israel\",\"Liberal Plan Means Ongoing Deficits and New Tax Hikes\"],\"x\":[13.226810455322266,16.333181381225586,66.16732788085938,69.89778137207031,23.277555465698242,26.731773376464844,54.52710723876953,14.311890602111816,8.25666332244873,18.16189956665039,28.052879333496094,19.731277465820312,18.336090087890625,17.162748336791992,27.829242706298828,5.803064346313477,13.862642288208008,-13.305597305297852,15.770017623901367,73.42466735839844,14.686213493347168,61.01997375488281,61.65863037109375,20.635883331298828,19.567951202392578,25.6387996673584,30.41994857788086,23.339704513549805,22.89043617248535,-1.9622154235839844,15.412819862365723,-60.885986328125,13.033377647399902,28.051082611083984,-54.34246826171875,23.469200134277344,3.063737392425537,52.487186431884766,-10.133333206176758,3.1964476108551025,25.521709442138672,5.29473876953125,20.193269729614258,-10.589550971984863,32.73194122314453,23.8115177154541,-26.19447135925293,25.027956008911133,2.031343698501587,17.10284423828125,43.04140853881836,25.86009979248047,6.55341911315918,-35.03155517578125,38.799312591552734,62.070350646972656,14.27381420135498,75.49150085449219,3.9775989055633545,25.789958953857422,17.657163619995117,25.76272964477539,20.400043487548828,65.14240264892578,35.513587951660156,25.11419105529785,62.64781951904297,0.016665583476424217,5.284274101257324,32.50343704223633,-0.30056139826774597,17.755842208862305,15.166583061218262,71.34278869628906,38.83919906616211,14.347723960876465,16.225618362426758,2.458791494369507,15.996591567993164,23.610309600830078,12.21123218536377,-1.0656929016113281,28.431135177612305,22.63611602783203,13.654783248901367,16.615154266357422,28.759475708007812,39.76884078979492,-10.639739036560059,2.4589157104492188,16.327722549438477,3.3739380836486816,20.036487579345703,22.391265869140625,14.691201210021973,69.19972229003906,16.693483352661133,18.173704147338867,16.217967987060547,17.429237365722656,19.870893478393555],\"y\":[-48.08392333984375,38.655582427978516,-38.82683563232422,-37.149444580078125,-89.83612060546875,-89.52434539794922,-5.919554710388184,34.03571319580078,7.822548866271973,32.413970947265625,-91.57482147216797,37.668678283691406,-16.07709503173828,-15.889174461364746,-89.97093200683594,-10.428963661193848,-50.59907150268555,44.027469635009766,-51.77797317504883,-38.17498016357422,48.452056884765625,41.010292053222656,41.275333404541016,47.07268142700195,40.58436965942383,8.537792205810547,-6.488652229309082,-36.99443817138672,-9.360817909240723,56.649539947509766,24.50924301147461,9.740585327148438,24.604135513305664,-87.70016479492188,-28.81163787841797,-33.98212814331055,50.84383010864258,5.551765441894531,69.15766906738281,-10.095191955566406,-38.28244400024414,-11.096513748168945,-21.841737747192383,69.0531005859375,-66.51941680908203,-37.414276123046875,-21.054323196411133,-91.86810302734375,53.741249084472656,29.02960205078125,-24.568933486938477,-88.39234161376953,-68.32553100585938,-40.514015197753906,-9.664718627929688,38.69313049316406,-35.52763366699219,-28.880983352661133,50.416748046875,10.216646194458008,48.27600860595703,-89.81886291503906,48.000885009765625,-31.0540771484375,-2.250007152557373,10.0358304977417,42.48054122924805,53.664161682128906,-13.010571479797363,-67.27279663085938,52.95718765258789,33.08518981933594,-34.52889633178711,-36.26869583129883,-68.84394073486328,-51.74048614501953,27.31625747680664,2.0913326740264893,48.18844223022461,-38.86894989013672,-53.01401901245117,55.4594841003418,-63.04377365112305,-57.753204345703125,-53.97943878173828,23.130054473876953,-5.92787504196167,-8.547921180725098,52.93661880493164,2.091442108154297,34.33792495727539,14.721479415893555,34.89419174194336,-56.984893798828125,39.33670425415039,-32.488948822021484,39.0295524597168,36.573699951171875,40.634368896484375,-51.36703109741211,45.17819595336914]}},\"id\":\"9515508b-7eaa-40e6-b04f-d294af592e28\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"text\":{\"field\":\"title\"},\"text_align\":\"center\",\"text_baseline\":\"middle\",\"text_color\":{\"value\":\"black\"},\"text_font\":\"courier\",\"text_font_size\":{\"value\":\"11pt\"},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"b5de7647-d533-4055-b849-9c25f6c67db1\",\"type\":\"Text\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.1},\"fill_color\":{\"value\":\"#1f77b4\"},\"line_alpha\":{\"value\":0.1},\"line_color\":{\"value\":\"#1f77b4\"},\"radius\":{\"units\":\"data\",\"value\":1},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"515ec358-bb3f-464a-ac82-765d8b3cb163\",\"type\":\"Circle\"},{\"attributes\":{\"data_source\":{\"id\":\"6fa6e961-86af-4672-8a3b-192f51f5280b\",\"type\":\"ColumnDataSource\"},\"glyph\":{\"id\":\"c90367f8-ce4f-4388-aa3b-f7e874944c85\",\"type\":\"Circle\"},\"hover_glyph\":null,\"nonselection_glyph\":{\"id\":\"0dcb7938-b4a4-40ce-ad7d-0e0152d6154c\",\"type\":\"Circle\"},\"selection_glyph\":null},\"id\":\"6d3048e8-f94b-4a63-b4cf-3faa3c0753ff\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"text\":{\"field\":\"title\"},\"text_align\":\"center\",\"text_alpha\":{\"value\":0.1},\"text_baseline\":\"middle\",\"text_color\":{\"value\":\"black\"},\"text_font\":\"courier\",\"text_font_size\":{\"value\":\"11pt\"},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"17da2081-270a-4e4d-bc55-7e583aad9ab9\",\"type\":\"Text\"},{\"attributes\":{\"data_source\":{\"id\":\"1a71ec30-adb5-42ba-a8ea-f990177990c2\",\"type\":\"ColumnDataSource\"},\"glyph\":{\"id\":\"b5de7647-d533-4055-b849-9c25f6c67db1\",\"type\":\"Text\"},\"hover_glyph\":null,\"nonselection_glyph\":{\"id\":\"17da2081-270a-4e4d-bc55-7e583aad9ab9\",\"type\":\"Text\"},\"selection_glyph\":null},\"id\":\"3328b00a-aeaa-4b35-97c4-89114cf650c0\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"callback\":null,\"column_names\":[\"y\",\"party\",\"_rowName\",\"x\",\"title\"],\"data\":{\"_rowName\":[\"pr1092\",\"pr1093\",\"pr1095\",\"pr1096\",\"pr1097\",\"pr1098\",\"pr1099\",\"pr1100\",\"pr1101\",\"pr1102\",\"pr1103\",\"pr1104\",\"pr1105\",\"pr1106\",\"pr1107\",\"pr1108\",\"pr1109\",\"pr1110\",\"pr1111\",\"pr1112\",\"pr1113\",\"pr1114\",\"pr1115\",\"pr1128\",\"pr1129\",\"pr1130\",\"pr1131\",\"pr1132\",\"pr1133\",\"pr1134\",\"pr1135\",\"pr1136\",\"pr1137\",\"pr1138\",\"pr1139\",\"pr1140\",\"pr1141\",\"pr1142\",\"pr1143\",\"pr1144\",\"pr1145\",\"pr1146\",\"pr756\",\"pr757\",\"pr758\",\"pr759\",\"pr760\",\"pr761\",\"pr762\",\"pr763\",\"pr764\",\"pr765\",\"pr766\",\"pr767\",\"pr768\",\"pr769\",\"pr770\",\"pr771\",\"pr772\",\"pr773\",\"pr774\",\"pr775\",\"pr777\",\"pr778\",\"pr779\",\"pr780\",\"pr781\",\"pr782\",\"pr783\",\"pr784\",\"pr785\",\"pr786\",\"pr787\",\"pr788\",\"pr789\",\"pr790\",\"pr791\",\"pr792\",\"pr793\",\"pr794\",\"pr795\",\"pr796\",\"pr797\",\"pr799\",\"pr800\",\"pr801\",\"pr802\",\"pr803\",\"pr804\",\"pr805\",\"pr806\",\"pr807\",\"pr808\",\"pr809\",\"pr810\",\"pr811\",\"pr812\",\"pr813\",\"pr814\",\"pr815\",\"pr816\",\"pr817\",\"pr818\",\"pr819\",\"pr820\",\"pr821\",\"pr822\",\"pr823\",\"pr824\",\"pr825\",\"pr826\",\"pr827\",\"pr828\",\"pr829\",\"pr830\",\"pr831\",\"pr832\",\"pr833\",\"pr834\",\"pr835\",\"pr836\",\"pr837\",\"pr838\",\"pr839\",\"pr840\",\"pr841\",\"pr842\",\"pr843\",\"pr844\",\"pr845\",\"pr846\",\"pr847\",\"pr848\",\"pr849\",\"pr850\",\"pr851\",\"pr852\",\"pr853\",\"pr854\",\"pr855\",\"pr856\",\"pr857\",\"pr858\",\"pr859\",\"pr860\",\"pr861\",\"pr862\",\"pr864\",\"pr865\",\"pr866\",\"pr867\",\"pr868\",\"pr869\",\"pr870\",\"pr871\",\"pr872\",\"pr873\",\"pr874\",\"pr875\",\"pr876\",\"pr877\",\"pr878\",\"pr879\",\"pr880\",\"pr881\",\"pr882\",\"pr884\",\"pr885\",\"pr886\",\"pr887\",\"pr888\",\"pr889\",\"pr890\",\"pr891\",\"pr892\",\"pr893\",\"pr894\",\"pr895\",\"pr896\",\"pr897\",\"pr898\",\"pr899\",\"pr900\",\"pr901\",\"pr902\",\"pr904\",\"pr905\",\"pr906\",\"pr907\",\"pr908\",\"pr909\",\"pr910\",\"pr912\",\"pr913\",\"pr915\",\"pr916\",\"pr917\",\"pr918\",\"pr919\",\"pr920\",\"pr921\",\"pr922\",\"pr923\",\"pr924\",\"pr925\",\"pr926\",\"pr927\",\"pr928\",\"pr929\",\"pr930\",\"pr931\",\"pr932\",\"pr933\",\"pr934\",\"pr935\",\"pr936\",\"pr937\",\"pr938\",\"pr939\",\"pr940\",\"pr941\",\"pr942\",\"pr944\",\"pr945\",\"pr946\",\"pr947\",\"pr948\",\"pr949\",\"pr950\",\"pr951\",\"pr952\",\"pr953\",\"pr955\",\"pr957\",\"pr958\",\"pr959\",\"pr960\",\"pr961\",\"pr964\",\"pr965\",\"pr966\",\"pr967\",\"pr969\",\"pr970\",\"pr971\",\"pr972\",\"pr973\",\"pr974\",\"pr975\",\"pr976\",\"pr977\",\"pr978\",\"pr979\",\"pr980\",\"pr981\",\"pr982\",\"pr983\",\"pr984\",\"pr985\",\"pr986\",\"pr987\",\"pr988\",\"pr989\",\"pr990\",\"pr991\",\"pr992\",\"pr994\",\"pr995\",\"pr996\",\"pr997\",\"pr998\"],\"party\":[\"liberal\",\"liberal\",\"liberal\",\"liberal\",\"liberal\",\"liberal\",\"liberal\",\"liberal\",\"liberal\",\"liberal\",\"liberal\",\"liberal\",\"liberal\",\"liberal\",\"liberal\",\"liberal\",\"liberal\",\"liberal\",\"liberal\",\"liberal\",\"liberal\",\"liberal\",\"liberal\",\"liberal\",\"liberal\",\"liberal\",\"liberal\",\"liberal\",\"liberal\",\"liberal\",\"liberal\",\"liberal\",\"liberal\",\"liberal\",\"liberal\",\"liberal\",\"liberal\",\"liberal\",\"liberal\",\"liberal\",\"liberal\",\"liberal\",\"liberal\",\"liberal\",\"liberal\",\"liberal\",\"liberal\",\"liberal\",\"liberal\",\"liberal\",\"liberal\",\"liberal\",\"liberal\",\"liberal\",\"liberal\",\"liberal\",\"liberal\",\"liberal\",\"liberal\",\"liberal\",\"liberal\",\"liberal\",\"liberal\",\"liberal\",\"liberal\",\"liberal\",\"liberal\",\"liberal\",\"liberal\",\"liberal\",\"liberal\",\"liberal\",\"liberal\",\"liberal\",\"liberal\",\"liberal\",\"liberal\",\"liberal\",\"liberal\",\"liberal\",\"liberal\",\"liberal\",\"liberal\",\"liberal\",\"liberal\",\"liberal\",\"liberal\",\"liberal\",\"liberal\",\"liberal\",\"liberal\",\"liberal\",\"liberal\",\"liberal\",\"liberal\",\"liberal\",\"liberal\",\"liberal\",\"liberal\",\"liberal\",\"liberal\",\"liberal\",\"liberal\",\"liberal\",\"liberal\",\"liberal\",\"liberal\",\"liberal\",\"liberal\",\"liberal\",\"liberal\",\"liberal\",\"liberal\",\"liberal\",\"liberal\",\"liberal\",\"liberal\",\"liberal\",\"liberal\",\"liberal\",\"liberal\",\"liberal\",\"liberal\",\"liberal\",\"liberal\",\"liberal\",\"liberal\",\"liberal\",\"liberal\",\"liberal\",\"liberal\",\"liberal\",\"liberal\",\"liberal\",\"liberal\",\"liberal\",\"liberal\",\"liberal\",\"liberal\",\"liberal\",\"liberal\",\"liberal\",\"liberal\",\"liberal\",\"liberal\",\"liberal\",\"liberal\",\"liberal\",\"liberal\",\"liberal\",\"liberal\",\"liberal\",\"liberal\",\"liberal\",\"liberal\",\"liberal\",\"liberal\",\"liberal\",\"liberal\",\"liberal\",\"liberal\",\"liberal\",\"liberal\",\"liberal\",\"liberal\",\"liberal\",\"liberal\",\"liberal\",\"liberal\",\"liberal\",\"liberal\",\"liberal\",\"liberal\",\"liberal\",\"liberal\",\"liberal\",\"liberal\",\"liberal\",\"liberal\",\"liberal\",\"liberal\",\"liberal\",\"liberal\",\"liberal\",\"liberal\",\"liberal\",\"liberal\",\"liberal\",\"liberal\",\"liberal\",\"liberal\",\"liberal\",\"liberal\",\"liberal\",\"liberal\",\"liberal\",\"liberal\",\"liberal\",\"liberal\",\"liberal\",\"liberal\",\"liberal\",\"liberal\",\"liberal\",\"liberal\",\"liberal\",\"liberal\",\"liberal\",\"liberal\",\"liberal\",\"liberal\",\"liberal\",\"liberal\",\"liberal\",\"liberal\",\"liberal\",\"liberal\",\"liberal\",\"liberal\",\"liberal\",\"liberal\",\"liberal\",\"liberal\",\"liberal\",\"liberal\",\"liberal\",\"liberal\",\"liberal\",\"liberal\",\"liberal\",\"liberal\",\"liberal\",\"liberal\",\"liberal\",\"liberal\",\"liberal\",\"liberal\",\"liberal\",\"liberal\",\"liberal\",\"liberal\",\"liberal\",\"liberal\",\"liberal\",\"liberal\",\"liberal\",\"liberal\",\"liberal\",\"liberal\",\"liberal\",\"liberal\",\"liberal\",\"liberal\",\"liberal\",\"liberal\",\"liberal\",\"liberal\",\"liberal\",\"liberal\",\"liberal\",\"liberal\",\"liberal\",\"liberal\",\"liberal\",\"liberal\",\"liberal\",\"liberal\",\"liberal\",\"liberal\",\"liberal\",\"liberal\"],\"title\":[\"Torontonians speak out against Mulcair's minimum wage mirage\",\"Harper's $27 million fiction: Conservatives receive largest taxpayer-funded rebate in history\",\"Trudeau reaffirms commitment to issue apology for Komagata Maru incident\",\"Debate Day: Justin Trudeau ready to fight for Canadians\",\"Justin Trudeau proves only Liberals have plan for real change\",\"Trudeau to share plan for real change in first Leaders Debate\",\"The Reviews Are In: First round goes to Trudeau\",\"Mulcair ducking debates because he has no answers\",\"Liberals wrap-up successful first week on campaign trail\",\"Liberal statement on International Day of the World's Indigenous Peoples\",\"NDP continues campaign of double-speak\",\"Trudeau ready to bring better government to Ottawa\",\"Only Trudeau offering plan for open and transparent government\",\"Trudeau presents plan for economic growth for middle class\",\"Six questions Nigel Wright must answer\",\"Liberals present plan for economic growth in Saskatchewan\",\"Trudeau unveils plan for First Nations education and opportunity\",\"Harper must remove Marjory LeBreton from Conservative campaign\",\"Liberals will stop Harper's end to home mail delivery\",\"Statement by Liberal Party of Canada Leader Justin Trudeau on Pakistan's Independence Day\",\"Week two sees Canadians embracing Liberal plan for real change\",\"Statement by Liberal Party of Canada Leader Justin Trudeau on India's Independence Day\",\"In their own words: Liberal plan for First Nations education and economic opportunity\",\"It's time for a real plan to grow the middle class\",\"Trudeau leads with plan for sustainable growth in Northern Ontario\",\"Fact Check: Harper's running another billion-dollar deficit\",\"Trudeau presents plan for modern working families\",\"Economist: NDP minimum wage claims  not supportable by the evidence\",\"Six questions Benjamin Perrin must answer\",\"Harper needs to tell Canadians the truth, and fire Ray Novak\",\"Trudeau offers better support for caregivers and growth for the middle class\",\"Mulcair's child care mirage won't help B.C. families\",\"Letter to RCMP Commissioner Bob Paulson and Information Commissioner Suzanne Legault from Dominic LeBlanc\",\"Week three: Liberals announce new measures to grow economy and middle class\",\"Liberal plan for caregivers met with positive reviews\",\"Letter to the Premier of Quebec from Liberal Party of Canada Leader Justin Trudeau\",\"Thomas Mulcair fails the middle class test\",\"Harper isn't fooling anyone on fisheries protection\",\"Statement by Liberal Party of Canada Leader Justin Trudeau on Black Ribbon Day\",\"FACT CHECK: Harper ducks accountability for his failed economic record\",\"Trudeau commits to major investments for veterans\",\"Plunging oil prices send Harper's hidden deficit higher\",\"Harper platform shows Conservatives have doubled-down on obsolete numbers\",\"Mulcair's platform continues to unravel\",\"Liberals present plan to grow agricultural sector\",\"Fact Check: Trudeau will keep pension income splitting for seniors\",\"Kevin Page:\\u00a0Mulcair's  Swiss-cheese fiscal costing\",\"Trudeau offers new leadership to reclaim Canada's place in the world\",\"Week eight: Liberals present transparent, prudent plan to invest in middle class\",\"NDP criticism of Liberal plan defies logic\",\"Statement by Liberal Party of Canada Leader Justin Trudeau on the Mid-Autumn Festival\",\"Liberals committed to growing economy and strengthening the middle class\",\"Liberal candidates meet with commuters across Canada to promote Justin Trudeau's transit plan\",\"Canada s economy needs investment, not Harper s and Mulcair s cuts\",\"Mulcair job killing one-two punch will hurt auto sector\",\"Today's parents won't get child care from Mulcair\",\"In Their Own Words:\\u00a0Mulcair will cut and break promises\",\"Trudeau commits to largest infrastructure investment in Canadian history\",\"Thomas Mulcair's $28 billion hole\",\"Week four: Liberals announce largest infrastructure investment in Canadian history\",\"Justin Trudeau attends Tamil Street Festival\",\"Statement by Liberal Party of Canada Leader Justin Trudeau on Ukraine's Independence Day\",\"BC candidates' letter to Thomas Mulcair on bulk water exports\",\"Quebec candidates' letter to Thomas Mulcair on bulk water exports\",\"Statement by Liberal Party of Canada Leader Justin Trudeau on Labour Day\",\"Justin Trudeau launches Liberal campaign plane\",\"Letter from Liberal Party of Canada Leader Justin Trudeau to Premier Gallant\",\"Trudeau outlines Liberal three-point plan for Canadians\",\"Liberals announce Employment Insurance that works for Canadians, strengthens economy\",\"Trudeau attends a Liberal rally in PEI\",\"Justin Trudeau in New Brunswick\",\"Trudeau promises affordable housing for Canadians\",\"Mulcair will hurt aerospace sector by raising corporate taxes, breaking promises\",\"Stephen Harper demonstrates once more that he understands nothing about culture\",\"Out-of-touch\\u00a0Harper on tumbling markets:   Our plan  has been working\",\"Trudeau commits to major investments for veterans\",\"Strong Liberal economic team will create real change for Canadians\",\"Trudeau commits to largest infrastructure investment in Canadian history\",\"Just like 2008 election, Harper is trying to deceive Canadians about recession and deficit mid-campaign\",\"Former Liberal Prime Minister Paul Martin supports Justin Trudeau's strong economic team in Brampton\",\"Strong Liberal economic team will create real change for Canadians\",\"Trudeau-led government to invest in our children and educators\",\"Mulcair's austerity pledge and phony middle class rhetoric don't add up\",\"Data shows Harper's economic mismanagement worst in the G7\",\"Mulcair shreds phony public transit pledge\",\"Fact Check: Harper's deception index\",\"First day of school\",\"Peggy Nash vs Peggy Nash:\",\"Trudeau only leader with plan to invest in middle class\",\"Another Harper trust scandal, same supporting cast\",\"Which is it, Tom?\\u00a0Karl Marx or Margaret Thatcher?\",\"Trudeau commits to historic investment in green infrastructure\",\"Mulcair's vanishing health care pledge\",\"Strong Liberal team will deliver historic infrastructure investment for Montreal\",\"Harper blatantly misleads about phony  surplus  \\u2013 He cannot be trusted\",\"Trudeau reaffirms commitment to strong, united Canada\",\"Novak's denials raise fresh questions, show Harper can't be trusted\",\"Liberals launch  Two Candidates  radio ad\",\"What they're saying: Trudeau commits to largest infrastructure investment in Canadian history\",\"Justin Trudeau attends 39th Jalsa Salana Canada\",\"Experts Agree: Harper distorts data, misleads Canadians about phony  surplus \",\"Statement by Liberal Party of Canada Leader Justin Trudeau on Mohamed Fahmy\",\"Mulcair will make cuts and break his promises to seniors\",\"Liberals announce plan for investment in Champlain Bridge infrastructure\",\"Justin Trudeau attends Mabuhay Philippines Festival in Toronto\",\"What they're saying: Canada needs a new plan for growth\",\"Trudeau announces historic investment in public transit\",\"Liberal Party of Canada welcomes AFN priorities\",\"Unemployment jumps under Harper's economic mismanagement\",\"Justin Trudeau announces historic investment in public transit\",\"Liberals commit to leadership on Syrian refugee crisis\",\"Trudeau promises affordable housing for Canadians\",\"Justin Trudeau and family attend batting practice with the Toronto Blue Jays\",\"Liberals to invest in Metro\\u00a0Vancouver\\u00a0public transit\",\"Letter from Liberal Party of Canada Leader Justin Trudeau to Stephen Harper, Thomas Mulcair, and Elizabeth May\",\"Liberal Party of Canada letter on Munk Leaders' Debates\",\"Week five: Liberals announce historic investments in public transit and green infrastructure\",\"Statement by Liberal Party of Canada Leader Justin Trudeau on Nayrouz\",\"Liberals to invest in Edmonton-area public transit\",\"Statement by Liberal Party of Canada Leader Justin Trudeau on Rosh Hashanah\",\"Liberal Party of Canada open letter to Minister Steven Blaney on Syrian refugees\",\"Conservative Party demonstrates its disregard for the French language\",\"Liberal candidates offering leadership on Syrian refugee crisis\",\"Trudeau reaffirms commitment to issue apology for Komagata Maru incident\",\"Syrian refugees: Stephen Harper must not stand in Quebec's way\",\"Harper minister on refugees:  The majority of people don't want them\",\"Trudeau announces plan to protect Canada's oceans\",\"Statement by Liberal Party of Canada Leader Justin Trudeau on the Anniversary of 9/11 and the National Day of Service\",\"Trudeau invests in jobs and opportunity for young Canadians\",\"Mulcair on Alberta:  the scandal that is Canada's tar sands development\",\"Justin Trudeau invests in jobs and opportunity for young Canadians\",\"Trudeau outlines bold vision for strong, united Canada\",\"Justin Trudeau hikes the Grouse Grind\",\"Liberals launch new French-language ads\",\"Where is Joe Oliver?\",\"Pay it back: Harper must return dirty Duffy money\",\"Week six: Liberals announce measures to create jobs, grow the middle class, and help those working to join it\",\"Mulcair cannot deliver on seniors' health care promise\",\"Justin Trudeau attends Liberal rally in Hamilton\",\"Justin Trudeau celebrates Rosh Hashanah\",\"Leaked NDP platform documents confirm Mulcair can't pay for promises\",\"Liberals offering greater retirement security for seniors\",\"Justin Trudeau plays Bocce\",\"Justin Trudeau offers greater retirement security for seniors\",\"Trudeau invests in jobs and skills training for Canadians\",\"Harper's covert cuts hurt families, helped send Canada into recession\",\"Mulcair celebrates Harper's deep cuts to middle class\",\"Mulcair can't pay for pharmacare promise\",\"Justin Trudeau in Newfoundland and Labrador\",\"Once again, Mulcair shows that he just cannot be trusted\",\"Mulcair's very bad Saturday\",\"Harper puts auto jobs at risk\",\"Trudeau announces plan to strengthen economy and create jobs with navy investment\",\"Liberals release new ads across Canada\",\"More economists blast flawed NDP costing\",\"Fact Check:\\u00a0Joe Oliver can't rewrite history\",\"Video reveals Mulcair praised west-east pipeline to American audience\",\"Liberals unveil new plan for immigration focused on family reunification, middle class growth\",\"Open letter to Canada's public servants\",\"Statement by Liberal Party of Canada Leader Justin Trudeau on Eid al-Adha\",\"Justin Trudeau celebrates Eid al-Adha\",\"Trudeau only Leader offering plan for middle class, real change from Harper\",\"Statement by Liberal Party of Canada Leader Justin Trudeau on Franco-Ontarian Day\",\"Trudeau family in Montr\\u00e9al\",\"Justin Trudeau walks a day in the life of a personal support worker\",\"Mulcair keeps peddling his infrastructure and public transit mirage\",\"Liberals investing in transparent and prudent fiscal plan for middle class\",\"Trudeau announces plan to ensure greater economic security for middle class families\",\"Liberals to invest in Canadian culture and middle class jobs\",\"Mulcair, NDP staff caught peddling\\u00a0blatant falsehoods \\u2013 even when confronted with undeniable video evidence\",\"Statement by Liberal Party of Canada Leader Justin Trudeau on Yom Kippur\",\"In Peterborough today, Harper can't escape his scandals\",\"Mulcair sides with Harper in favour of unaffordable F-35 stealth fighters\",\"Secret NDP briefing note reveals Mulcair's child care deception\",\"Justin Trudeau in Ottawa\",\"New Video: Mulcair opposed Quebec child care\",\"Statement by Liberal Party for Canada Leader Justin Trudeau on Mohamed Fahmy\",\"Trudeau sharing plan for real change for middle class in first French-language Leaders' debate\",\"Liberals to invest in flood mitigation and public transit in Calgary\",\"Justin Trudeau invests in jobs and skills training for Canadians\",\"Mulcair's plan will cost nearly 150,000 jobs, pretends Harper's recession never happened\",\"Stephen Harper wants to decide who is Canadian\",\"The truth about Harper's and Mulcair's failed plan\",\"Justin Trudeau canoes the Bow River\",\"What they are saying: Liberals have strongest plan to create jobs and grow economy\",\"Gaffe-prone Andrew Thomson cannot keep his numbers straight\",\"Trudeau continues sharing plan for real change in second Leaders' Debate\",\"The reviews are in: Trudeau shows leadership with plan for real change\",\"More abuse of parliamentary resources by the NDP\",\"Trudeau only Leader with real plan to grow Canada's economy\",\"Trudeau promotes innovation to create jobs, strengthen middle class, and grow economy\",\"The reviews are in: Trudeau shows leadership with plan for real change\",\"Thomas Mulcair is no friend of the environment\",\"Secret Foreign Affairs memo is an indictment of Harper's failures\",\"Justin Trudeau celebrates the Mid-Autumn Festival\",\"Justin Trudeau in North York\",\"Only Liberals offering change for Canada on world stage\",\"He does it again: Mulcair tries to re-write history on water privatization and export\",\"Liberals announce reconciliation plan for the M\\u00e9tis Nation\",\"Liberals to invest in Canadian families, grow the middle class\",\"Fact Check: Desperate NDP makes false claims about Liberal First Nations funding\",\"Justin Trudeau announces reconciliation plan for the M\\u00e9tis Nation\",\"NDP can't keep tabs on its own Swiss-cheese spending promises\",\"Liberals release new French-language ads across Canada\",\"NDP candidate speaks out against Mulcair's decision to adopt Harper's budget\",\"Justin Trudeau in London\",\"Liberals offering plan for real change, transparency in government\",\"Liberal immigration plan focused on family reunification, middle class growth\",\"Raw sewage treatment: Denis Lebel's hypocritical lecturing\",\"Statement by Liberal Party of Canada Leader Justin Trudeau on the anniversary of multiculturalism\",\"Justin Trudeau in New Brunswick\",\"Mulcair\\u00a0contradicts himself once again \\u2013 this time on wastewater in Montreal\",\"Liberals to invest in Greater Toronto and Hamilton Area transit\",\"Liberals to take concrete action on domestic violence and sexual assault\",\"Trudeau presents plan to invest in Canadians' health and home care\",\"Liberals to invest in Greater Montreal infrastructure\",\"Thomas Mulcair is no friend of the environment\",\"New Video: Mulcair spoke out against Davie shipyard\",\"Liberals to invest in Greater Montr\\u00e9al infrastructure\",\"Statement by Liberal Party of Canada Leader Justin Trudeau on a recent assault in Montreal\",\"Liberals commit to protecting Canadians' right to vote\",\"VIDEO: Mulcair railed against job\\u00a0supports, before pretending to favour them\",\"Trudeau promoting real change for middle class in second French-language Leaders' debate\",\"Trudeau showcases plan for real change in French-language debate\",\"Trudeau-led government will bring immediate change for middle class\",\"Fact Check: NDP makes false claims about Liberal First Nations funding\",\"NDP candidates oppose Mulcair's no-deficit commitment\",\"Mulcair cannot pay for his promises, won't help the middle class\",\"After ten failed years, Harper's platform offers more of the same\",\"Statement by Liberal Party of Canada Leader Justin Trudeau on World Mental Health Day\",\"Talking turkey this Thanksgiving\",\"Liberals release new campaign ads across Canada\",\"Even Rob and Doug Ford are ready for change from Harper\",\"Mulcair energetically advocated for water privatization and export\",\"Liberals to invest in Canada's North\",\"Letter to Premier Bob McLeod\",\"Liberals hold largest rally in decades\",\"Liberal plan offers real, progressive change for all Canadians\",\"Liberal plan will make real, immediate investment in young Canadians\",\"Liberal plan offers real change for voters across the country\",\"Mulcair twists his position again \\u2013 this time on marijuana legalization\",\"Justin Trudeau meets with the Ukrainian Canadian Congress\",\"Dishonest Conservative attacks reach new lows\",\"Fact Check: Mulcair falsely claims he does not criticize Liberals\",\"Canadians won't be fooled by Harper's gameshow gimmick\",\"Liberals launch five new English-language ads\",\"Trudeau unveils Liberal platform for a strong middle class\",\"Statement by Liberal Party of Canada Leader Justin Trudeau on the Trans-Pacific Partnership\",\"Statement by Liberal Party of Canada Leader Justin Trudeau on the Sisters in Spirit Vigils for missing and murdered Indigenous women and girls\",\"Justin Trudeau at the Rally for Change Now\",\"Justin Trudeau in Nunavut and the Northwest Territories\",\"Fact Check: NDP criticism of Liberal platform defies logic\",\"Statement by Liberal Party of Canada Leader Justin Trudeau on Republic Day\",\"Mulcair does it again \\u2013 flip-flops on TPP, pipelines\",\"Justin Trudeau unveils  A New Plan for a Strong Middle Class\",\"Open letter to Canadians from Justin Trudeau\",\"Trudeau commits to record investments in Canadian children and poverty reduction\",\"Mulcair cannot pay for his health care promises\",\"Week ten: Trudeau launches platform, continues sharing new plan for a strong middle class\",\"Liberals to invest in northerners and Nutrition North\",\"Justin Trudeau in Nepean\",\"Statement by Liberal Party of Canada Leader Justin Trudeau on Thanksgiving\",\"Ten years of Harper is hurting the economy, middle class\",\"Trudeau family celebrates Thanksgiving\",\"Fact Check: Trudeau will deliver tax fairness for families, workers, and seniors\",\"Harper misleads Ontario families\",\"Trudeau celebrates diversity with Liberal team in Montr\\u00e9al\",\"Statement by Liberal Party of Canada Leader Justin Trudeau on National Acadian Day\",\"Trudeau: Labour movement essential to middle class growth\",\"Letter to the Prime Minister from Justin Trudeau\",\"FACT CHECK: Mulcair changes position on debates\"],\"x\":[-39.440406799316406,32.30503845214844,2.4587676525115967,-41.62725067138672,-34.8261833190918,-34.51510238647461,-45.487640380859375,-52.99070358276367,-27.148818969726562,24.7175235748291,-33.25371551513672,-39.8360481262207,-61.049407958984375,-27.592254638671875,-80.02332305908203,-24.991342544555664,26.353145599365234,-78.81318664550781,-33.97303009033203,5.361638069152832,19.231496810913086,5.165165424346924,-31.29290008544922,-31.303258895874023,33.766990661621094,36.57359313964844,-13.124387741088867,-37.031211853027344,-80.33656311035156,-82.42403411865234,-12.245306015014648,-34.063961029052734,-82.0670166015625,-23.291507720947266,62.95098876953125,21.919090270996094,-36.64311981201172,43.40437316894531,28.539384841918945,30.00310707092285,50.668846130371094,38.129337310791016,32.33440399169922,25.66029930114746,34.11623001098633,-24.442081451416016,31.414226531982422,-17.887128829956055,-20.560672760009766,40.1806526184082,65.56236267089844,-12.43012809753418,55.92728042602539,33.528587341308594,24.062021255493164,17.007465362548828,20.975284576416016,41.84600830078125,19.7985897064209,-22.553552627563477,-44.460060119628906,19.545743942260742,29.551639556884766,29.112092971801758,-2.1488094329833984,2.4587888717651367,22.877967834472656,-10.719128608703613,2.388047695159912,-11.514532089233398,-12.70119857788086,-15.223784446716309,25.383249282836914,-17.006319046020508,29.11626625061035,-30.669328689575195,35.552520751953125,40.758888244628906,38.0905647277832,35.82945251464844,-32.11809158325195,-12.360821723937988,22.56340980529785,31.11746597290039,16.226612091064453,2.4588024616241455,-17.913740158081055,22.519439697265625,31.937576293945312,-81.46971893310547,-45.86787414550781,41.29079055786133,8.073203086853027,36.26131057739258,37.25299835205078,-5.24686336517334,-81.44514465332031,-35.49419403076172,-29.845367431640625,-43.443119049072266,40.133934020996094,-98.27082824707031,19.922868728637695,52.001068115234375,-44.31948471069336,-29.167613983154297,56.5272216796875,23.01407241821289,32.417579650878906,50.80971145629883,2.5005757808685303,-16.332372665405273,-17.57939338684082,55.07114791870117,1.199072003364563,-47.301597595214844,-21.056997299194336,76.85324096679688,56.093238830566406,70.36216735839844,-5.1028242111206055,-39.310752868652344,2.278552532196045,-0.9428207278251648,-28.68416976928711,-42.69456100463867,41.489810943603516,38.108863830566406,-1.8999708890914917,-37.692012786865234,-3.301652431488037,-38.71314239501953,-49.457828521728516,-15.491494178771973,33.04100036621094,-40.14719772338867,-22.7052059173584,8.162671089172363,-31.524337768554688,-40.71651840209961,10.531109809875488,-14.311588287353516,-49.14759063720703,-48.75824737548828,-1.3108350038528442,35.05202102661133,33.840415954589844,30.819032669067383,-9.938573837280273,-45.48262405395508,-35.69711685180664,-27.551023483276367,37.15134048461914,-20.998291015625,30.366588592529297,41.842655181884766,-34.43275451660156,-15.350403785705566,20.519926071166992,75.9867172241211,-40.638946533203125,-9.785078048706055,2.458686590194702,-55.93461608886719,-25.055795669555664,11.725765228271484,-19.957853317260742,-13.943228721618652,33.70585632324219,-37.44794845581055,72.73843383789062,-73.03278350830078,-32.8194694519043,-35.04567337036133,-12.570612907409668,-36.03525161743164,-98.0967788696289,-11.069714546203613,52.68843078613281,-0.9422277808189392,26.684240341186523,-6.68168306350708,35.3614501953125,-34.765262603759766,34.06816482543945,31.642744064331055,-9.226828575134277,-50.87083053588867,-69.23563385009766,-10.4153413772583,-4.404782772064209,-45.50664520263672,5.829346656799316,-6.199624538421631,-44.21510314941406,-12.886204719543457,-17.44854736328125,-34.30879592895508,25.981916427612305,-17.425996780395508,6.989750385284424,-31.983478546142578,25.103158950805664,-21.577106475830078,26.209312438964844,-19.627405166625977,-60.53925704956055,-16.107839584350586,-23.537731170654297,-1.0607991218566895,-13.125008583068848,-25.21915626525879,54.80076217651367,40.70475769042969,21.555936813354492,54.0167121887207,6.447795867919922,-32.293983459472656,58.76597595214844,-2.5075037479400635,-70.06419372558594,-31.466005325317383,-10.169234275817871,-7.302952766418457,-31.788585662841797,6.4936933517456055,28.14683723449707,27.076641082763672,-4.061214447021484,19.6761531829834,-48.11195755004883,-23.105749130249023,-42.44802474975586,-38.70448303222656,-31.171375274658203,-32.81776428222656,-39.39513397216797,-33.05057907104492,-3.2027597427368164,-39.81438446044922,-35.361610412597656,-41.3748664855957,7.4648823738098145,-42.86827087402344,-38.202701568603516,-3.5605905055999756,-17.045595169067383,13.74182415008545,39.0504264831543,-28.193634033203125,-22.085899353027344,40.64869689941406,5.932807922363281,-31.90348243713379,-29.617504119873047,-42.016849517822266,-16.777790069580078,8.626126289367676,-30.449472427368164,-30.779253005981445,-11.594091415405273,73.9991455078125,32.03636932373047,-14.460413932800293,-24.647550582885742,36.6683235168457,-3.827645778656006,6.194674968719482,2.458876371383667,-80.44123840332031,-49.98046112060547],\"y\":[-11.973275184631348,68.9880142211914,2.0913772583007812,-74.54389190673828,24.009000778198242,24.97972869873047,-59.62334442138672,-24.743757247924805,5.471474647521973,-20.109371185302734,-28.464336395263672,13.476348876953125,7.943209648132324,31.22262954711914,-4.974542617797852,31.069978713989258,-15.701120376586914,-7.454270362854004,-8.367143630981445,-6.828360557556152,-11.680807113647461,-8.909440040588379,-74.74742126464844,31.45873260498047,8.911018371582031,69.77638244628906,50.39615249633789,-13.274443626403809,-12.431058883666992,-9.849874496459961,51.827484130859375,31.336442947387695,-6.609769344329834,9.242521286010742,36.85689926147461,-16.547571182250977,22.991992950439453,-28.116071701049805,-64.25680541992188,91.760986328125,31.03459358215332,70.43443298339844,80.62118530273438,80.49369049072266,9.922270774841309,70.67678833007812,76.7057876586914,-50.24175262451172,12.878664016723633,86.48820495605469,-38.56333923339844,27.369979858398438,1.4358326196670532,49.55351257324219,69.63558959960938,75.15254974365234,70.87902069091797,2.304905414581299,66.89811706542969,8.590773582458496,-76.63750457763672,-62.71266555786133,-28.817218780517578,-28.819143295288086,-2.209090232849121,2.091252565383911,-14.380117416381836,32.99560546875,8.022870063781738,-4.242790699005127,-6.721199035644531,32.167572021484375,69.00082397460938,-16.110286712646484,91.37014770507812,16.699636459350586,1.2769049406051636,1.4061803817749023,75.99007415771484,2.2613091468811035,-63.76080322265625,48.71207046508789,70.12406921386719,92.16278839111328,73.4334487915039,2.091261625289917,2.1544923782348633,48.91572570800781,48.5428581237793,-4.433953762054443,-49.564231872558594,-19.714815139770508,72.6309585571289,-0.6581852436065674,74.97631072998047,-19.44174575805664,-11.782150268554688,38.93315887451172,-74.87355041503906,-76.71122741699219,71.67642211914062,-1.72322678565979,70.0678939819336,-2.7644312381744385,-75.40847778320312,-75.01303100585938,-1.3639415502548218,-18.346923828125,49.39456558227539,1.4429740905761719,-66.77705383300781,31.099430084228516,0.5583630800247192,-2.9080629348754883,-65.45561981201172,-24.118799209594727,11.682111740112305,-27.730981826782227,-3.33711576461792,-33.33994674682617,-55.00178909301758,-40.5262451171875,-67.04151153564453,3.3205206394195557,-21.064659118652344,-52.07307434082031,-20.49619483947754,-68.55802917480469,18.833898544311523,-25.279987335205078,23.057931900024414,11.86586856842041,-58.2807731628418,-25.58664321899414,77.87281036376953,-8.899076461791992,13.032357215881348,74.33329010009766,-63.039066314697266,-72.7448959350586,76.51979064941406,38.672054290771484,57.08906173706055,57.20228576660156,16.51093101501465,68.65647888183594,68.4141845703125,76.68157958984375,-4.907354831695557,-47.75263214111328,-21.61724090576172,-27.190208435058594,-11.031601905822754,26.523103713989258,74.44258117675781,71.36598205566406,-24.951993942260742,51.11264419555664,-16.720401763916016,-29.564376831054688,-70.65861511230469,28.924551010131836,2.0914113521575928,-54.274253845214844,9.801849365234375,76.9572982788086,14.676090240478516,42.62797546386719,0.3486560583114624,-20.61833381652832,-36.670021057128906,1.1961779594421387,-22.596324920654297,-10.008225440979004,-3.924132823944092,-11.264633178710938,-3.1289992332458496,28.124353408813477,1.006062388420105,13.200499534606934,78.62870788574219,-20.388925552368164,50.204681396484375,-74.38249969482422,25.76677894592285,81.43022918701172,31.44450569152832,-53.713253021240234,5.062987327575684,30.4172420501709,24.567068099975586,-61.19761276245117,-29.162927627563477,-46.584930419921875,-74.32472229003906,1.278711199760437,-50.41725540161133,-22.254825592041016,-18.23055648803711,37.47883605957031,82.54918670654297,15.814430236816406,82.19400024414062,26.06768226623535,73.0982437133789,4.107171058654785,7.387486457824707,51.32913589477539,-14.834695816040039,-15.837169647216797,-4.709984302520752,-14.627606391906738,-0.833121657371521,-52.39088821411133,-1.7684279680252075,-2.119258165359497,-29.099605560302734,-12.969826698303223,-7.071836948394775,-19.560649871826172,3.321171760559082,-12.555476188659668,27.55328941345215,28.32137107849121,32.37343215942383,82.8823013305664,72.97581481933594,77.91618347167969,41.818851470947266,-18.379758834838867,-50.94004821777344,24.905261993408203,-56.016395568847656,-19.95663833618164,57.296234130859375,-64.60722351074219,-0.24893902242183685,33.00841522216797,16.476863861083984,15.151668548583984,-28.260107040405273,-51.09920883178711,-68.7587661743164,-58.167720794677734,22.744243621826172,42.03158950805664,35.85795593261719,-36.0700798034668,-52.384986877441406,15.84061050415039,7.111278057098389,86.59506225585938,-5.224052429199219,-26.20197868347168,17.95661735534668,14.514604568481445,38.32912826538086,74.71491241455078,35.346435546875,57.0184211730957,-0.768474280834198,-27.69037437438965,54.569122314453125,0.8904635906219482,70.28650665283203,66.76979064941406,-18.41828155517578,-3.89935040473938,2.091402769088745,-6.774400234222412,-23.621912002563477]}},\"id\":\"4b2abee7-28ca-4089-b4ac-c41bd5b05147\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.1},\"fill_color\":{\"value\":\"#1f77b4\"},\"line_alpha\":{\"value\":0.1},\"line_color\":{\"value\":\"#1f77b4\"},\"radius\":{\"units\":\"data\",\"value\":1},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"3504683d-2a33-49ab-bacb-a7ebccf4fa89\",\"type\":\"Circle\"},{\"attributes\":{\"min_border\":1,\"plot_height\":700,\"plot_width\":900,\"renderers\":[{\"id\":\"d68ddf70-881d-487b-b81b-8871b3c66663\",\"type\":\"Legend\"},{\"id\":\"b4ece864-27f0-408c-b3ac-c5a561337306\",\"type\":\"GlyphRenderer\"},{\"id\":\"30fb04e8-a7e1-4124-b54b-63e33f36e964\",\"type\":\"GlyphRenderer\"},{\"id\":\"6d3048e8-f94b-4a63-b4cf-3faa3c0753ff\",\"type\":\"GlyphRenderer\"},{\"id\":\"d313cde6-26a4-42c7-807b-0443c568522e\",\"type\":\"GlyphRenderer\"},{\"id\":\"e58ab1ec-bd70-40cc-ba5f-511fa90b4989\",\"type\":\"GlyphRenderer\"},{\"id\":\"3328b00a-aeaa-4b35-97c4-89114cf650c0\",\"type\":\"GlyphRenderer\"}],\"title\":\"Press Releases of Canadian Federal Parties During 2015 Elections\",\"tool_events\":{\"id\":\"77567792-e7f6-4cf0-aaec-73950942a57a\",\"type\":\"ToolEvents\"},\"toolbar_location\":null,\"tools\":[{\"id\":\"fbf0d91f-02ee-4097-8c2e-73d77434524b\",\"type\":\"HoverTool\"}],\"x_range\":{\"id\":\"90f984d2-a6db-4cf1-94c2-0923bd465cc8\",\"type\":\"DataRange1d\"},\"y_range\":{\"id\":\"43629dac-fb73-4b9b-b5c7-18e3d0470837\",\"type\":\"DataRange1d\"}},\"id\":\"95ac976e-5f7f-442d-a348-f8f15f5e1951\",\"subtype\":\"Figure\",\"type\":\"Plot\"},{\"attributes\":{},\"id\":\"77567792-e7f6-4cf0-aaec-73950942a57a\",\"type\":\"ToolEvents\"},{\"attributes\":{\"data_source\":{\"id\":\"d34bffb8-af9b-481e-8766-0f76a81de956\",\"type\":\"ColumnDataSource\"},\"glyph\":{\"id\":\"5d83dadb-3466-48c6-8372-5a73125d2361\",\"type\":\"Rect\"},\"hover_glyph\":null,\"nonselection_glyph\":{\"id\":\"95ea1557-beee-4c4a-88f8-f576851232e1\",\"type\":\"Rect\"},\"selection_glyph\":null},\"id\":\"e58ab1ec-bd70-40cc-ba5f-511fa90b4989\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.6},\"fill_color\":{\"value\":\"white\"},\"height\":{\"units\":\"data\",\"value\":5},\"line_alpha\":{\"value\":0.6},\"line_color\":{\"value\":\"white\"},\"width\":{\"field\":\"width\",\"units\":\"data\"},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"5d83dadb-3466-48c6-8372-5a73125d2361\",\"type\":\"Rect\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.1},\"fill_color\":{\"value\":\"#1f77b4\"},\"height\":{\"units\":\"data\",\"value\":5},\"line_alpha\":{\"value\":0.1},\"line_color\":{\"value\":\"#1f77b4\"},\"width\":{\"field\":\"width\",\"units\":\"data\"},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"95ea1557-beee-4c4a-88f8-f576851232e1\",\"type\":\"Rect\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.5},\"fill_color\":{\"value\":\"#FF8000\"},\"line_color\":{\"value\":\"#FF8000\"},\"radius\":{\"units\":\"data\",\"value\":1},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"618508ae-8154-4611-b8ef-ed39ceee7f07\",\"type\":\"Circle\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.5},\"fill_color\":{\"value\":\"#DF0101\"},\"line_color\":{\"value\":\"#DF0101\"},\"radius\":{\"units\":\"data\",\"value\":1},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"af5527e4-b608-48be-a5e8-aafaaa975000\",\"type\":\"Circle\"}],\"root_ids\":[\"95ac976e-5f7f-442d-a348-f8f15f5e1951\"]},\"title\":\"Bokeh Application\",\"version\":\"0.11.1\"}};\n",
       "            var render_items = [{\"docid\":\"74ce27d2-97bd-4b64-9d84-1a5a68ee91d3\",\"elementid\":\"0c42ca9f-fa34-4748-9f0e-c24f660b3ef9\",\"modelid\":\"95ac976e-5f7f-442d-a348-f8f15f5e1951\",\"notebook_comms_target\":\"517c8806-9f67-49be-8698-299d78580155\"}];\n",
       "            \n",
       "            Bokeh.embed.embed_items(docs_json, render_items);\n",
       "        });\n",
       "      },\n",
       "      function(Bokeh) {\n",
       "      }\n",
       "    ];\n",
       "  \n",
       "    function run_inline_js() {\n",
       "      for (var i = 0; i < inline_js.length; i++) {\n",
       "        inline_js[i](window.Bokeh);\n",
       "      }\n",
       "    }\n",
       "  \n",
       "    if (window._bokeh_is_loading === 0) {\n",
       "      console.log(\"Bokeh: BokehJS loaded, going straight to plotting\");\n",
       "      run_inline_js();\n",
       "    } else {\n",
       "      load_libs(js_urls, function() {\n",
       "        console.log(\"Bokeh: BokehJS plotting callback run at\", now());\n",
       "        run_inline_js();\n",
       "      });\n",
       "    }\n",
       "  }(this));\n",
       "</script>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "text/html": [
       "<p><code>&lt;Bokeh Notebook handle for <strong>In[20]</strong>&gt;</code></p>"
      ],
      "text/plain": [
       "<bokeh.io._CommsHandle at 0x7f3e5fee2650>"
      ]
     },
     "execution_count": 20,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "fig = bp.figure(\n",
    "    plot_width=900, plot_height=700, x_axis_type=None, y_axis_type=None, min_border=1,\n",
    "    title=\"Press Releases of Canadian Federal Parties During 2015 Elections\",\n",
    "    tools = [HoverTool(tooltips=[('title', '@title')])], toolbar_location=None\n",
    ")\n",
    "\n",
    "# the colored points\n",
    "colormap = {\"ndp\": \"#FF8000\", \"liberal\": \"#DF0101\", \"conservative\": \"#0000FF\", \"green\": \"#01DF01\"}\n",
    "for party, color in colormap.iteritems():\n",
    "    fig.scatter(\n",
    "        x='x', y='y', color=color, radius=1, fill_alpha=0.5, legend=party,\n",
    "        source=bp.ColumnDataSource(pr[pr['party'] == party])\n",
    "    )\n",
    "\n",
    "# add some subtle white background for the text to be more visible\n",
    "fig.rect(\n",
    "    x='x', y='y', color='white', alpha=.6, height=5,\n",
    "    width = [1 + len(w)*2.5 for w in kw['title'].values],  # heuristic\n",
    "    source=bp.ColumnDataSource(kw)\n",
    ")\n",
    "\n",
    "# the keywords on top of the scatter plot\n",
    "fig.text(\n",
    "    x='x', y='y', text='title', text_font_size='11pt', text_color='black', text_font='courier',\n",
    "    text_align='center', text_baseline='middle',  source=bp.ColumnDataSource(kw)\n",
    ")\n",
    "\n",
    "bp.show(fig)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "collapsed": true
   },
   "source": [
    "This plot is interactive. You can explore it by hovering over the different press releases and the tooltip will show the title of each press release. Now have fun spotting thematic biases across parties!"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 2",
   "language": "python",
   "name": "python2"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 2
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython2",
   "version": "2.7.6"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 0
}
